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?
  12. Javascript was designed for which of the following purposes
  13. Which of the following attribute is used to specify the character encoding used in an external script file?
  14. Executable single line of Script is called as _________________.
JavaScript MCQ

Take JavaScript Quiz To test your Knowledge 

Below is the few JavaScript MCQ test that checks your basic knowledge of JavaScript. This JavaScript Test contains 20 Multiple Choice Questions with 4 options. You have to select the right answer to a question. 

Also, Read the 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
  • To Style HTML Pages
  • To Perform Server Side Scripting Opertion
  • To add interactivity to HTML Pages
  • To Execute Query Related to DB on Server
View Answer
  • Breakpoint in JS
  • Statement in JavaScript
  • Line in JS
  • None of the above
View Answer
  • Executable Statement
  • Declaration Statement
  • Conditional Statement
  • Assignment Statement
View Answer
  • Assignment operator
  • Bitwise Operator
  • Conditional operator
  • Logical Operator
View Answer