JavaScript MCQ : JS Statements (Multiple Choice Questions)


Question 1
What will be printed on the screen ?
A
100101010
B
10030
C
1001020
D
130
Question 1 Explanation: 
String + Number = String
Question 2
During addition of two numbers , suppose one of the number is NaN then output of the following code will be ?
A
Null
B
NaN
C
Zero
D
Infinite
Question 2 Explanation: 
NaN + Any Value = NaN
Question 3
+Infinity in JS gets added with +Infinity then output of the code will be -
A
+Infinity
B
NaN
C
-Infinity
Question 3 Explanation: 
+Infinity + +Infinity = +Infinity
Question 4
-Infinity in JS gets added with -Infinity then output of the code will be -
A
-Infinity
B
NaN
C
+Infinity
Question 4 Explanation: 
-Infinity + -Infinity = -Infinity
Question 5
-Infinity in JS gets added with +Infinity then output of the code will be -
A
-Infinity
B
NaN
C
+Infinity
Question 5 Explanation: 
+Infinity + -Infinity = NaN
There are 5 questions to complete.