Javascript Quiz

Want to test your Javascript skills?

Let's begin!



1.Inside which HTML element do we put the Javascript file?

<Javascript>
<scripting>
<script>
<js>

2.How do you write an IF statement for executing some code if "i" is NOT equal to 5?


if (i<>5)
if (i=!5)
if(i<5)
if(i!=5)

3.The external Javascript file must be contained in the script tag.


True
False

4.What is the correct way to write a javascript array?


var colors="red", "green", "blue"
(1:"red", 2:"green", 3:"blue")
["red", "green", "blue"]
1 =("red"), 2 =("green"), 3 =("blue")

5.Javascript is the same as Java.


True
False