Congratulations - You have completed JavaScript : MCQ.
Your Score | : | %%SCORE%% |
Total Marks | : | %%TOTAL%% |
Rating | : | %%RATING%% |
Wrong Answers | : | %%WRONG_ANSWERS%% |
Your answers are highlighted below.
Question 1 |
Which of the following is not a compound assignment operator.
>>= | |
=== | |
<<= | |
+= |
Question 1 Explanation:
Compound assignment operators exist for each of the major mathematical operations
Question 2 |
If a string cannot be converted to a number __________ will be returned.
Zero | |
Null | |
Infinite | |
NaN |
Question 2 Explanation:
NaN stands for Not A Number.
Question 3 |
If the values on either side of '+' operator are numerical values then ___________.
values are added together | |
None of These | |
values are concatenated together. |
Question 4 |
<html> <head> <title>A Simple Page</title> <script language="JavaScript"> <!-- var A = "Compile ", B = "Error"; C = A + B; alert(C); // --> </script> </head> <body></body> </html>What will be printed ?
Nothing will be printed | |
"Compile Error" will be printed | |
None of these |
Question 5 |
var str = "Str"; var num = 10; var output = str + num;What will be the value of Variable 'output' ?
Null | |
NaN | |
Nothing will be printed | |
Str10 |
Question 5 Explanation:
String + Number = String
Question 6 |
What will be printed on the screen ?
1001020 | |
10030 | |
100101010 | |
130 |
Question 6 Explanation:
String + Number = String
Question 7 |
During addition of two numbers , suppose one of the number is NaN then output of the following code will be ?
Zero | |
Null | |
NaN | |
Infinite |
Question 7 Explanation:
NaN + Any Value = NaN
Question 8 |
+Infinity in JS gets added with +Infinity then output of the code will be -
+Infinity | |
-Infinity | |
NaN |
Question 8 Explanation:
+Infinity + +Infinity = +Infinity
Question 9 |
-Infinity in JS gets added with -Infinity then output of the code will be -
NaN | |
+Infinity | |
-Infinity |
Question 9 Explanation:
-Infinity + -Infinity = -Infinity
Question 10 |
-Infinity in JS gets added with +Infinity then output of the code will be -
+Infinity | |
-Infinity | |
NaN |
Question 10 Explanation:
+Infinity + -Infinity = NaN
Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
There are 10 questions to complete.