JavaScript MCQs with answers Page - 43

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. When using comparative operators,if after object to primitive conversion, at least one operand is not a string, both operands are converted to?

  • (A) Object
  • (B) Number
  • (C) Boolean
  • (D) String

A

Admin • 833K Points
Coach

Q. If the operator value is null, then the unary operator returns the typeof _________.

  • (A) string
  • (B) boolean
  • (C) object
  • (D) undefined

A

Admin • 833K Points
Coach

Q. which operator evaluates its operands, then discards the value and returns undefined?

  • (A) Void
  • (B) Eval
  • (C) Comparison
  • (D) In

A

Admin • 833K Points
Coach

Q. If var A={B:3, C:5}, how to use the delete operator to delete one of the properties of an object.

  • (A) delete
  • (B) delete A
  • (C) delete A.B
  • (D) delete A[0]

A

Admin • 833K Points
Coach

Q. What will be the output if we compare "ten" and 10 with less then comparison operator("ten"<10)?

  • (A) True
  • (B) False
  • (C) undefined
  • (D) error

A

Admin • 833K Points
Coach

Q. State whether the following statements are True or False for strict equality operator(= = =).
i) If the two values have different types they are equal.
ii) If both values are null or both values are undefined, they are equal.

  • (A) False True
  • (B) True False
  • (C) False False
  • (D) True True

A

Admin • 833K Points
Coach

Q. which operator outputs the remainder of an integer division?

  • (A) Increment
  • (B) Modulus
  • (C) Subtraction
  • (D) Add

A

Admin • 833K Points
Coach

Q. Which operator checks if the value of the left operand is greater than the value of the right operand?

  • (A) Greater than or Equal to
  • (B) Less than
  • (C) Greater than
  • (D) Equal

A

Admin • 833K Points
Coach

Q. Which of the following statement is true about BitWise OR?

  • (A) It is a unary operator and operates by reversing all the bits in the operand.
  • (B) It performs a Boolean AND operation on each bit of its integer arguments
  • (C) Both A and B
  • (D) It performs a Boolean OR operation on each bit of its integer arguments.

A

Admin • 833K Points
Coach

Q. A __________ will be visible only within a function where it is defined.

  • (A) global variables
  • (B) local variable
  • (C) Both A and B
  • (D) None of the above