This quiz will test the very basic JS knowledge. If you have gone through w3 schools website, this should be a very easy quiz. Have fun!
Function coolfunction () {}
Function=coolFunction();
Function:coolFunction(){}
Function coolFunction () {}
Call alert ('message' + msg);
Alert ('message' + msg);
AlertBox ('message' + msg);
All of the above
A++ increments the value of a by 1, ++a is incorrect
Both are same and increment the value of a by 1
Both increments the value of a by 1 but a++ does it after assignment and ++a does it before assignment
Both are wrong and will cause an error in the code
>
=
!=
Return
Exit
Continue
Break
Str.substr(4,9);
Str.part(3,5);
Str.substr(3,5);
Str.part(4,9);
Onfinished
Onload
Onunload
Oncomplete
For (i
For i = 0 to 5 {…}
For (i = 0; i
For (i = 0; i
Var txt = new Array ="tim","kim","jim";
Var txt = new Array("tim","kim","jim");
Var txt = new Array:1=("tim")2=("kim")3=("jim");
Var txt = new Array(1:"tim",2:"kim",3:"jim");
Will return error as this is not a valid statement in JS.
If testCond is equal to 1 then result will contain an array with two elements pass and fail.
If testCond is equal to 1 then result will contain string pass otherwise it will be set to fail.
Result will contain value of testCond if the testCond is equal to 1
Wait!
Here's an interesting quiz for you.