0% found this document useful (0 votes)
1K views

W3School Javascript Quiz Test PDF

The document summarizes the results of a JavaScript quiz taken on the W3Schools website. The quiz consisted of 25 multiple choice questions testing JavaScript syntax and concepts. The user answered 22 questions correctly out of 25 for a score of 88%. Some of the questions covered topics like inserting JavaScript, using functions, if/else statements, loops, arrays, and operators.

Uploaded by

Leonardo Meza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

W3School Javascript Quiz Test PDF

The document summarizes the results of a JavaScript quiz taken on the W3Schools website. The quiz consisted of 25 multiple choice questions testing JavaScript syntax and concepts. The user answered 22 questions correctly out of 25 for a score of 88%. Some of the questions covered topics like inserting JavaScript, using functions, if/else statements, loops, arrays, and operators.

Uploaded by

Leonardo Meza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

4/10/2016 W3Schools JavaScript Quiz Test

w3schools.com
THE WORLD'S LARGEST WEB DEVELOPER SITE

Cornetto Pop Rock Season1
Cornetto Cupidity Pakistan
Become a part of Cornetto Music Revolution
Watch the Promo Online

W3Schools JavaScript Quiz


JavaScript QUIZ Points: 22 out of 25

1. Inside which HTML element do we put the JavaScript?

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:

document.getElementById("demo").innerHTML = "Hello World!";

 Correct Answer!

3. Where is the correct place to insert a JavaScript?

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!

5. The external JavaScript file must contain the <script> tag.

You answered:

False

 Correct Answer!

6. How do you write "Hello World" in an alert box?

You answered:

alert("Hello World");

 Correct Answer!

7. How do you create a function in JavaScript?

You answered:

function myFunction()

 Correct Answer!

8. How do you call a function named "myFunction"?

You answered:

myFunction()

 Correct Answer!

http://www.w3schools.com/quiztest/result.asp 2/10
4/10/2016 W3Schools JavaScript Quiz Test

9. How to write an IF statement in JavaScript?

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!

11. How does a WHILE loop start?

You answered:

while (i <= 10)

 Correct Answer!

12. How does a FOR loop start?

You answered:

for (i = 0; i <= 5; i++)

 Correct Answer!

13. How can you add a comment in a JavaScript?

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:

/*This comment has
more than one line*/

 Correct Answer!

15. What is the correct way to write a JavaScript array?

You answered:

var colors = ["red", "green", "blue"]

 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!

19. JavaScript is the same as Java.

http://www.w3schools.com/quiztest/result.asp 4/10
4/10/2016 W3Schools JavaScript Quiz Test

You answered:

False

 Correct Answer!

20. How can you detect the client's browser name?

You answered:

client.navName

 Wrong Answer!

21. Which event occurs when the user clicks on an HTML element?

You answered:

onclick

 Correct Answer!

22. How do you declare a JavaScript variable?

You answered:

var carName;

 Correct Answer!

23. Which operator is used to assign a value to a variable?

You answered:

 Correct Answer!

24. What will the following code return: Boolean(10 > 9)

You answered:

http://www.w3schools.com/quiztest/result.asp 5/10
4/10/2016 W3Schools JavaScript Quiz Test

true

 Correct Answer!

25. Is JavaScript case­sensitive?

You answered:

Yes

 Correct Answer!

By W3Schools Time spent: 8:43 

http://www.w3schools.com/quiztest/result.asp 6/10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy