JavaScript MCQ : JS Operators (Multiple Choice Questions)


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