What will be the output of the following code snippet?
<script type="text/javascript"> a = 5 + "9"; document.write(a); </script>
Javascript Basics-2
Quiz
•
Other
•
Professional Development
•
Hard
SUNDARESAN K
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
<script type="text/javascript"> a = 5 + "9"; document.write(a); </script>
Compilation Error
14
Run Time Error
59
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output for the following code snippet?
<p id="example"></p> <script> function Func() { document.getElementById("example").innerHTML=Math.sqrt(81); } </script>
9
81
Error
0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
var a = 1; var b = 0; while (a <= 3) { a++; b += a * 2; print(b); }
4 10 18
1 2 3
1 4 7
4 10 16
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
var a = Math.max(); var b = Math.min(); print(a); print(b);
-Infinity Infinity
-Infinity -Infinity
Infinity -Infinity
Infinity Infinity
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
var a = Math.max() < Math.min(); var b = Math.max() > Math.min(); print(a); print(b);
true true
true false
false true
false false
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
var a = true + true + true * 3; print(a)
3
0
Error
5
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
var a = "hello"; var sum = 0; for(var i = 0; i < a.length; i++) { sum += (a[i] - 'a'); } print(sum);
47
NaN
0
None of these
10 questions
#Sg_Spaic Last season Quiz (ML and Python)
Quiz
•
KG - Professional Dev...
12 questions
JS Quiz SECE
Quiz
•
Professional Development
13 questions
TEC-T96
Quiz
•
Professional Development
15 questions
Scratch Sprites Quiz
Quiz
•
KG - Professional Dev...
15 questions
Javascript Basics-1
Quiz
•
Professional Development
20 questions
Saat kac? - Telling the time in Turkish
Quiz
•
KG - Professional Dev...
10 questions
CSS flexbox quiz
Quiz
•
Professional Development
20 questions
CSS Unit 1
Quiz
•
Professional Development
15 questions
Multiplication Facts
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
math review
Quiz
•
4th Grade
5 questions
capitalization in sentences
Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions
Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines
Quiz
•
Professional Development
12 questions
Dividing Fractions
Quiz
•
6th Grade