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.
A
VALUE
B
EQUALS
C
==
D
=
Question 2
Multiple Declarations of variables are separated by ___________ symbol
A
Colon
B
Comma
C
Semicolon
D
Asterisk
Question 3
Underscore can be used as first letter while declaring variable in JavaScript .
A
False
B
True
Question 4
var var1 = "Pritesh";
Above variable can store value of type -
A
Integer
B
String
C
None of these
D
Any Type
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.
A
Error
B
5
6
56
C
5
6
10
D
5
6
11
There are 5 questions to complete.