JavaScript MCQs with answers Page - 3

Here, you will find a collection of MCQ questions on JavaScript. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 831.35K Points
Coach

Q. The statement p===q refers to _________

  • (A) There is no such statement
  • (B) Both p and q are equal in value, type and reference address
  • (C) Both p and q are equal in value
  • (D) Both p and q are equal in value and type

A

Admin • 831.35K Points
Coach

Q. The snippet that has to be used to check if “a” is not equal to “null” is _________

  • (A) if(a!==null)
  • (B) if(a!null)
  • (C) if (!a)
  • (D) if(a!=null)

A

Admin • 831.35K Points
Coach

Q. The escape sequence ‘f’ stands for _________

  • (A) Form feed
  • (B) f is not present in JavaScript
  • (C) Representation of functions that returns a value
  • (D) Floating numbers

A

Admin • 831.35K Points
Coach

Q. Which of the following is not considered as an error in JavaScript?

  • (A) Missing of Bracket
  • (B) Syntax error
  • (C) Missing of semicolons
  • (D) Division by zero

A

Admin • 831.35K Points
Coach

Q. JavaScript _________ when there is an indefinite or an infinite value during an arithmetic computation.

  • (A) Prints the value as such
  • (B) Prints an exception error
  • (C) Prints an overflow error
  • (D) Displays “Infinity”

A

Admin • 831.35K Points
Coach

Q. JavaScript Code can be called by using

  • (A) Preprocessor
  • (B) Function/Method
  • (C) RMI
  • (D) Triggering Event

A

Admin • 831.35K Points
Coach

Q. Among the following, which one is a ternary operator?

  • (A) ?:
  • (B) -
  • (C) :
  • (D) +

A

Admin • 831.35K Points
Coach

Q. Which of the operator is used to test if a particular property exists or not?

  • (A) exist
  • (B) exists
  • (C) in
  • (D) within

A

Admin • 831.35K Points
Coach

Q. What kind of an expression is “new Point(2,3)”?

  • (A) Invocation Expression
  • (B) Constructor Calling Expression
  • (C) Primary Expression
  • (D) Object Creation Expression

A

Admin • 831.35K Points
Coach

Q. Consider the following code snippet :
What does the last statement return ?

Code:
function constfunctions() 
{
    var functions = [];
    for(var k = 0; k < 10; k++)
        functions [k] = function() { return k; };
    return functions ;
}
var functions = constfunctions();
functions [5]()
  • (A) 10
  • (B) 9
  • (C) 0
  • (D) All of above

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ