Home JavaScript MCQs JavaScript MCQs I

JavaScript MCQs I

by Techarge
8 minutes read

Wonderful JavaScript MCQs Series for Beginner .Practice these MCQs to enhance and test the knowledge of JavaScript.

1.______________ is used to display whether a value is a number or not.

  1. NaN
  2. isundefined
  3. isNan
  4. undefined

3)isNan


2.Which type of JavaScript language is ___

  1. Object-Oriented
  2. Object-Based
  3. Assembly-language
  4. High-level

2)Object-Based


3.What is right about variables?

  1. Variables are case sensitive
  2. % is a valid first character for variable name
  3. ^US is a valid variable name
  4. 7Wonders is a valid variable name to

1)Variables are case sensitive


4.Is the given definition a valid variable definition? var 100apples

  1. No
  2. Yes

1)No


5.Which one of the following also known as Conditional Expression:

  1. Alternative to if-else
  2. Switch statement
  3. If-then-else statement
  4. immediate if

4)immediate if


6.Which statement has the correct JavaScript syntax?

  1. console.log(“text”);
  2. document.write(“text”)
  3. alert stop ;

1)console.log(“text”);


7.In JavaScript, what is a block of statement?

  1. Conditional block
  2. block that combines a number of statements into a single compound statement
  3. both conditional block and a single statement
  4. block that contains a single statement

2)block that combines a number of statements into a single compound statement


8.What is the ideal place to load the external JavaScript file in your HTML document?

  1. Anywhere within the body is good enough
  2. Towards the beginning of the body to load the page along with the JavaScript code
  3. Towards the end of the body to increase the performance of the webpage

3)Towards the end of the body to increase the performance of the webpage


9.When interpreter encounters an empty statements, what it will do:

  1. Shows a warning
  2. Prompts to complete the statement
  3. Throws an error
  4. Ignores the statements

4)Ignores the statements


10.Is the given assignment a valid variable assignment? var product cost = 3.45;

  1. No, floating numbers are not allowed.
  2. No, there should be no space in the variable name.
  3. Yes, it is valid.

2)No, there should be no space in the variable name.


11.JavaScript ignores?

  1. newlines
  2. tabs
  3. spaces
  4. All of the above

4)All of the above


12.JavaScript has to be called inside ________ tags.

  1. Either in body or head
  2. head
  3. script
  4. body

3)script


13.Which one of the following options are not valid in JavaScript?

  1. “My name is “Harry” “
  2. “My name is Harry”
  3. My name is Harry’
  4. “My name is ‘Harry’ “

1)”My name is “Harry” “


Pass Your Next Certification Exam – First Time, Every Time .100% Real Exam Questions, Practice Tests, Study Guides & Training Courses, refer to this exam dumps and pass the exam with flying colours.

14.You wish to create an alert. Select the correct one from the following options.

  1. alert(‘goodbye”);
  2. alert(“goodbye’);
  3. alert(‘he said “goodbye” ‘);

3)alert(‘he said “goodbye” ‘);


15.Which symbol is used separate JavaScript statements?

  1. Comma (,)
  2. Colon (:)
  3. Hyphen (_)
  4. Semicolon (;)

4) Semicolon (;)


You may also like

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.