JavaScript MCQs with answers Page - 38

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. _________ cannot accept negative indexes.

  • (A) slice()
  • (B) substring()
  • (C) Both A and B
  • (D) none of the above

A

Admin • 833K Points
Coach

Q. Some browsers do not allow spaces behind the character.

  • (A) Yes
  • (B) No
  • (C) Can be yes or no
  • (D) Can not say

A

Admin • 833K Points
Coach

Q. JavaScript allows you to work with __________ primitive data types.

  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 4

A

Admin • 833K Points
Coach

Q. JavaScript also defines _______ trivial data types.

  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 4

A

Admin • 833K Points
Coach

Q. Variables are declared with the _______ keyword.

  • (A) new
  • (B) var
  • (C) int
  • (D) this

A

Admin • 833K Points
Coach

Q. Storing a value in a variable is called ?

  • (A) variable initialization
  • (B) variable store
  • (C) variable destroyed
  • (D) variable declaration

A

Admin • 833K Points
Coach

Q. JavaScript is untyped language.

  • (A) Yes
  • (B) No
  • (C) can be yes or no
  • (D) Can not say

A

Admin • 833K Points
Coach

Q. A ___________ has global scope which means it can be defined anywhere in your JavaScript code.

  • (A) complex variable
  • (B) simple variable
  • (C) global variable
  • (D) local variable

A

Admin • 833K Points
Coach

Q. Which of the following true about JavaScript variable?

  • (A) JavaScript variable names are case-sensitive
  • (B) JavaScript variable names should not start with a numeral
  • (C) You should not use any of the JavaScript reserved keywords as a variable name.
  • (D) All of the above

A

Admin • 833K Points
Coach

Q. Which of the following are javaScript reserved words?

  • (A) enum
  • (B) long
  • (C) finally
  • (D) All of the 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