JavaScript MCQ : JS Variables (Multiple Choice Questions)
Question 1 |
Initialization of variable can be done by writing _____ operator in between variable name and operand value.
VALUE | |
EQUALS | |
== | |
= |
Question 2 |
Multiple Declarations of variables are separated by ___________ symbol
Asterisk | |
Comma | |
Colon | |
Semicolon |
Question 3 |
Underscore can be used as first letter while declaring variable in JavaScript .
True | |
False |
Question 4 |
var var1 = "Pritesh";Above variable can store value of type -
Any Type | |
String | |
Integer | |
None of these |
Question 5 |
<!DOCTYPE html> <html> <body> <script> var x = 5; var y = 6; var z = 5 + 6; document.write(x + "<br>"); document.write(y + "<br>"); document.write(z + "<br>"); </script> </body> </html>Guess output of the following code.
5 6 10 | |
5 6 11 | |
Error | |
5 6 56 |
There are 5 questions to complete.