Font size
WorksheetsJavascript Assessment
Total questions: 20
Worksheet time: 10mins
What will be the output of the code?
33
2
1
8
What will be the output of the code?
TRUE
FALSE
What will be the output of the code?
NaN
Number
Null
undefined
What will be the output of the code?
TRUE
FALSE
What will be the output of the code?
1
0
"true"
true
What will be the output of the code?
NaN
3
5
13
What will be the output of the code?
1
2
9
undefined
What will be the output of the code?
TRUE
FALSE
What will be the output of the code?
String
Number
1
True
What will be the output of the code?
TRUE
FALSE
If you type the following code in the console window, what result will you get?
3 > 2 > 1 === false;
TRUE
FALSE
Javascript is a _________-side programming language.
Client
Server
Cloud
Personal
Which of the following will write the message “Hello DataFlair!” in an alert box?
alertBox(“Hello DataFlair!”);
alert(Hello DataFlair!);
msgAlert(“Hello DataFlair!”);
alert(“Hello DataFlair!”);
How do you find the minimum of x and y using JavaScript?
min(x,y);
Math.min(x,y)
Math.min(xy)
min(xy);
Which of the following statements will throw an error?
Please select 2 correct answers.
var fun = function bar( ){ }
var fun = function bar{ }
function fun( ){ }
function( ){ }
If the value of x is 40, then what is the output of the following program?
(x % 10 == 0)? console.log(“Divisible by 10”) : console.log(“Not divisible by 10”);
ReferenceError
Divisible by 10
Not divisible by 10
None of the above
Which JavaScript label catches all the values, except for the ones specified?
Catch
Label
Try
Default
Which is the correct “if” statements to execute certain code if “x” is equal to 2?
if(x 2)
if(x = 2)
if(x == 2)
if(x != 2 )
What will the code return?
Boolean(3 < 7)
True
False
NaN
Syntax Error
What is the output of the following code in the console?
var x = 0; function fun(){ ++x;
this.x = x;
return x;
}
var bar = new new fun;
console.log(bar.x);
ReferenceError
Undefined
1
TypeError
