JavaScript MCQ : JS Operators (Multiple Choice Questions)


Question 1
Integer Variable + Character Variable + Undefined Variable = ______________ Value
A
Integer
B
Character
C
Text / String Value
D
Undefined Value
Question 2
Which of the following is not a comparison operator ?
A
++
B
<=
C
==
D
===
E
>=
Question 3
What will be the output of the following script ?
<!DOCTYPE html>
<html>
    <body>
        <script>
            var x = 5;
            document.write(x === "5");
        </script>
    </body>
</html>
A
5
B
false
C
true
D
1
Question 3 Explanation: 
Variable "x" is having integer value and we are using "===" operator. '===' operator will check the value and the type of value.
Question 4
What will be the output of the following script ?
<!DOCTYPE html>
<html>
    <body>
        <script>
            var x = 5;
            document.write(x == "5");
        </script>
    </body>
</html>
A
5
B
Undefined
C
true
D
false
Question 4 Explanation: 
"==" operator just checks the value.
Question 5
Adding String and Integer always results in _________.
A
String
B
None of these
C
Integer
D
Character
There are 5 questions to complete.