JavaScript MCQs with answers Page - 50

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 of the following statement is not true regarding JavaScript

  • (A) Javascript is a loosely typed language
  • (B) Javascript is an object based language
  • (C) Javascript is event driven
  • (D) Javascript embedded in an HTML document is compiled and executed by the client browser

A

Admin • 833K Points
Coach

Q. In Java Script, if you add a leading zero like "0127" the number system followed is

  • (A) Decimal
  • (B) Octal
  • (C) Binary
  • (D) Hexadecimal

A

Admin • 833K Points
Coach

Q. In Java Script, ____ is an object of the target language data type that encloses an object of the source language

  • (A) a wrapper
  • (B) a link
  • (C) a cursor
  • (D) a form

A

Admin • 833K Points
Coach

Q. In JavaScript which of the following is used to declare variable

  • (A) var
  • (B) dim
  • (C) function
  • (D) const

A

Admin • 833K Points
Coach

Q. In Javascript each window object has sub-object, which called

  • (A) Features
  • (B) Properties
  • (C) Characteristics
  • (D) Qualifiers

A

Admin • 833K Points
Coach

Q. Which one is standard way to show popup in Java Script?

  • (A) alert("mcqbuddy")
  • (B) window("mcqbuddy");
  • (C) alert("mcqbuddy");
  • (D) window.alert("mcqbuddy");

A

Admin • 833K Points
Coach

Q. What is divide by 0 in Javascript?

Code:
var a = 10;
var b = 0;
document.write(a/b);
  • (A) 0 is printed
  • (B) Infinity is printed
  • (C) Some Garbage Value
  • (D) Nothing is printed

A

Admin • 833K Points
Coach

Q. What is default value of any variable in Javascript?

Code:
var a;
document.write(a);
  • (A) 0
  • (B) undefined
  • (C) error
  • (D) NaN

A

Admin • 833K Points
Coach

Q. How ++ works in Javascript? Find output of below Javascript code.

Code:
var a = 10;
document.write(a++);
document.write(a);
  • (A) 1010
  • (B) 1011
  • (C) 1110
  • (D) 1111

A

Admin • 833K Points
Coach

Q. Find output of below Javascript code

Code:
var a = 10;
document.write(a=20);
  • (A) 10
  • (B) 20
  • (C) Error
  • (D) Nothing is printed

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