NEW
Font size
WorksheetsJavascript
Total questions: 10
Worksheet time: 5mins
What will be the output of the following code snippet?
4 10 18
1 2 3
1 4 3
3 4 1
What will be the output of the following code snippet?
3, 4
2, 3
3,4,5
2,3,4
What will be the output of the following code snippet?
47
NaN
0
None of these
How do we write a comment in javascript?
/* */
%%
##
&&
_____event gets activated when a component is clicked
onfocus
onblur
onclick
onerror
What will be the output of the following JavaScript code snippet?
false
true
Compile time error
Run time error
What will be the output of the following JavaScript code snippet?
int a=1;
if(a!=null)
return 1;
else return 0;
0
1
Run time error
compile time error
What happens in the following JavaScript code snippet?
var js = 0;
while (js < 10)
{
console.log(js);
js++;
}
An exception is thrown
The values of js are logged or stored in a particular location or storage
The value of js from 0 to 9 is displayed in the console
An error is displayed
What will be the output of the following JavaScript code?
var quiz=[1,2,3];
var js=[6,7,8];
var result=quiz.concat(js);
document.writeln(result);
1, 2, 3, 6, 7, 8
123
1,2,3
Error
Why event handlers is needed in JS?
Allows JavaScript code to alter the behaviour of windows
Adds innerHTML page to the code
Change the server location
Performs handling of exceptions and occurrences
