JavaScript MCQs with answers Page - 137

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 • 833K Points
Coach

Q. Which built-in object is used for mathematical operations?

  • (A) Math
  • (B) Number
  • (C) Calc
  • (D) Count

A

Admin • 833K Points
Coach

Q. What does the 'typeof' operator return for a function?

  • (A) function
  • (B) object
  • (C) method
  • (D) callable

A

Admin • 833K Points
Coach

Q. Which of the following can be used to stop a setInterval?

  • (A) clearInterval()
  • (B) stopInterval()
  • (C) pauseInterval()
  • (D) cancelInterval()

A

Admin • 833K Points
Coach

Q. Which symbol is used for nullish coalescing in JavaScript?

  • (A) ??
  • (B) ||
  • (C) &&
  • (D) ::

A

Admin • 833K Points
Coach

Q. Which method returns the first element that satisfies a testing function?

  • (A) find()
  • (B) filter()
  • (C) map()
  • (D) some()

A

Admin • 833K Points
Coach

Q. Which method tests whether at least one element passes a test?

  • (A) some()
  • (B) every()
  • (C) includes()
  • (D) find()

A

Admin • 833K Points
Coach

Q. What is the purpose of the 'use strict' directive?

  • (A) Enables strict mode which catches common coding bugs
  • (B) Enables TypeScript syntax
  • (C) Disables error reporting
  • (D) Forces all variables to be global

A

Admin • 833K Points
Coach

Q. Which method is used to round a number down to the nearest integer?

  • (A) Math.floor()
  • (B) Math.ceil()
  • (C) Math.round()
  • (D) Math.cut()

A

Admin • 833K Points
Coach

Q. Which operator checks both value and type?

  • (A) ===
  • (B) ==
  • (C) =
  • (D) !=

A

Admin • 833K Points
Coach

Q. How do you create an object in JavaScript?

  • (A) let obj = {};
  • (B) let obj = [];
  • (C) let obj = ();
  • (D) let obj = <>;

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