JavaScript MCQ : JS Statements (Multiple Choice Questions)


Question 1
What will be printed on the screen ?
A
100101010
B
130
C
1001020
D
10030
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
Zero
B
Infinite
C
NaN
D
Null
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
+Infinity
C
NaN
Question 4 Explanation: 
-Infinity + -Infinity = -Infinity
Question 5
-Infinity in JS gets added with +Infinity then output of the code will be -
A
NaN
B
-Infinity
C
+Infinity
Question 5 Explanation: 
+Infinity + -Infinity = NaN
There are 5 questions to complete.