JavaScript MCQ : JS Operators (Multiple Choice Questions)


Question 1
Integer Variable + Character Variable + Undefined Variable = ______________ Value
A
Integer
B
Character
C
Undefined Value
D
Text / String 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
true
C
false
D
Undefined
Question 4 Explanation: 
"==" operator just checks the value.
Question 5
Adding String and Integer always results in _________.
A
Character
B
None of these
C
String
D
Integer
There are 5 questions to complete.