Home

JavaScript MCQ Question with Answer

JavaScript MCQ with detailed explanation for interview, entrance and competitive exams. Explanation are given for understanding.

Download JavaScript MCQ Question Answer PDF

Question No : 15
What will be the output of the following Javascript code?

<script>
document.getElementById("demo").innerHTML = typeof "John"
</script>


integer
number
string
error

Question No : 16
JavaScript Code can be called by using ___________

RMI
Triggering Event
Preprocessor
Function/Method

Question No : 17
The type of a variable that is volatile is _______________

Volatile variable
Mutable variable
Immutable variable
Dynamic variable

Question No : 18
A hexadecimal literal begins with __________

00
0x
0X
Both 0x and 0X

Question No : 19
The generalised syntax for a real number representation is __________

[digits][.digits][(E|e)[(+|-)]digits]
[digits][+digits][(E|e)[(+|-)]digits]
[digits][(E|e)[(+|-)]digits]
[.digits][digits][(E|e)[(+|-)]digits]

Question No : 20
JavaScript _________ when there is an indefinite or an infinite value during an arithmetic computation.

Prints an exception error
Prints an overflow error
Displays Infinity
Prints the value as such

Question No : 21
Which of the following is not considered as an error in JavaScript?

Syntax error
Missing of semicolons
Division by zero
Missing of Bracket