JavaScript MCQ Quiz

  1. In which element we put javascript?
  2. the correct place to insert a JavaScript is ?
  3. Which of the following is the correct syntax for referring to an external script called "xxx.js"?
  4. How we write "Hello World" in an alert box?
  5. Which of the following is an IF statement in JavaScript?
  6. Which of the following is the correct statement of WHILE loop start?
  7. Which of the following is the correct statement for comment in a JavaScript?
  8. Is JavaScript is the same as Java?
  9. ____________operator is used to assign a value to a variable?
  10. JavaScript is case-sensitive. True or False?
  11. Which of the following event occurs when the user clicks on an HTML element?
JavaScript MCQ

Take JavaScript Quiz To test your Knowledge 

Below are few JavaScript MCQ test that checks your basic knowledge of JavaScript. This JavaScript Test contains around 20 questions of multiple choice with 4 options. You have to select the right answer to a question. You can see the correct answer by clicking view answer link.

Also, Read Best JavaScript interview questions.

  • <javascript>
  • <scripting>
  • <script>
  • None of These
View Answer
  • The <head> section
  • The <body> section
  • Both 1 & 2
  • none of these
View Answer
  • <script src="xxx.js">
  • <script src="xxx.js">
  • <script name="xxx.js">
  • None of These
View Answer
  • alertBox("Hello World");
  • msgBox("Hello World");
  • msg("Hello World");
  • alert("Hello World");
View Answer
  • if i = 5
  • if i = 5 then
  • if (i == 5)
  • All of these
View Answer
  • while (i <= 10)
  • while (i <= 10; i++)
  • while i = 1 to 10
  • None of These
View Answer
  • //This is a comment
  • <!--This is a comment-->
  • 'This is a comment
  • None of These
View Answer
  • Yes
  • No
View Answer
  • *
  • x
  • =
  • +
View Answer
  • True
  • False
View Answer
  • onmouseclick
  • onmouseover
  • onclick
  • None
View Answer