Quiz on Sample Code - JavaScript

Quiz
•
Professional Development
•
Professional Development
•
Hard
Usha B A
Used 3+ times
FREE Resource
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following JavaScript code?
<p id="demo"></p>
var txt1 = "St'Joseph's_";
var txt2 = "IT";
document.getElementById("demo").innerHTML = txt1 + txt2;
error
St'Joseph's_ IT
undefined
St'Joseph's_IT
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following JavaScript code?
<p id="demo">
</p> <script>
var js = 10;
js *= 5;
document.getElementById("demo").innerHTML = js;
</script>
10
50
5
Error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Will the following JavaScript code work?
var js = (function(x) {return x*x;}(10));
Exception will be thrown
Memory leak
Error
Yes, perfectly
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following JavaScript code snippet?
int a=1;
if(a!=null) // JavaScript not equal to Operators
return 1;
else
return 0;
0
1
Compiler Error
Runtime Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following JavaScript code?
function height()
{
var height = 123.56;
var type = (height>=190) ? "tall" : "short";
return type;
}
short
123.56
tall
190
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following JavaScript function?
<p id="demo">
</p> <script>
function javascript()
{
// javacript abs() method
document.getElementById("demo").innerHTML = Math.abs(-7.25);
}
</script>
-7.25
7.25
-7
7
Similar Resources on Wayground
11 questions
Node y NPM (Parte 1)

Quiz
•
Professional Development
10 questions
Checklist Crane

Quiz
•
Professional Development
10 questions
Nodejs: Templating with EJS

Quiz
•
Professional Development
10 questions
Quiz on Angular JS

Quiz
•
Professional Development
10 questions
Full Stack Quiz 10

Quiz
•
Professional Development
10 questions
Quiz Javascript

Quiz
•
Professional Development
10 questions
Super 15 batch quiz

Quiz
•
Professional Development
11 questions
Внедрение контента на HTML-страницу

Quiz
•
Professional Development
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade