W3School Javascript Quiz Test
W3School Javascript Quiz Test
w3schools.com
THE WORLD'S LARGEST WEB DEVELOPER SITE
You answered:
<script>
Correct Answer!
2. What is the correct JavaScript syntax to change the content of the HTML
element below?
☰
<p id="demo">This is a demonstration.</p>
You answered:
Correct Answer!
You answered:
Both the <head> section and the <body> section are correct
http://www.w3schools.com/quiztest/result.asp 1/10
4/10/2016 W3Schools JavaScript Quiz Test
Correct Answer!
4. What is the correct syntax for referring to an external script called "xxx.js"?
You answered:
<script href="xxx.js">
Wrong Answer!
You answered:
False
Correct Answer!
You answered:
alert("Hello World");
Correct Answer!
You answered:
function myFunction()
Correct Answer!
You answered:
myFunction()
Correct Answer!
http://www.w3schools.com/quiztest/result.asp 2/10
4/10/2016 W3Schools JavaScript Quiz Test
You answered:
if (i == 5)
Correct Answer!
10. How to write an IF statement for executing some code if "i" is NOT equal
to 5?
You answered:
if (i != 5)
Correct Answer!
You answered:
Correct Answer!
You answered:
Correct Answer!
You answered:
//This is a comment
Correct Answer!
14. How to insert a comment that has more than one line?
http://www.w3schools.com/quiztest/result.asp 3/10
4/10/2016 W3Schools JavaScript Quiz Test
You answered:
Correct Answer!
You answered:
Correct Answer!
16. How do you round the number 7.25, to the nearest integer?
You answered:
Math.round(7.25)
Correct Answer!
17. How do you find the number with the highest value of x and y?
You answered:
Math.max(x, y)
Correct Answer!
18. What is the correct JavaScript syntax for opening a new window called
"w2" ?
You answered:
w2 = window.new("http://www.w3schools.com");
Wrong Answer!
http://www.w3schools.com/quiztest/result.asp 4/10
4/10/2016 W3Schools JavaScript Quiz Test
You answered:
False
Correct Answer!
You answered:
client.navName
Wrong Answer!
21. Which event occurs when the user clicks on an HTML element?
You answered:
onclick
Correct Answer!
You answered:
var carName;
Correct Answer!
You answered:
Correct Answer!
You answered:
http://www.w3schools.com/quiztest/result.asp 5/10
4/10/2016 W3Schools JavaScript Quiz Test
true
Correct Answer!
You answered:
Yes
Correct Answer!
http://www.w3schools.com/quiztest/result.asp 6/10