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