Home / Programming MCQs / JavaScript MCQs / Question
C
Q. What will be the output of the following JavaScript code?
// JavaScript Comparison Operators function compare() { let a=2; let b=2.0; if(a==b) return true; else return false; }
The == in JS convert different types of operands to the same type before making the comparison whereas a strict comparison === results in true value if the operands are of the same type and the contents match.
You must be Logged in to update hint/solution
How to find the index of a particular string?
Which character is used to break up a code line within a text string in JavaScript?
What is the other way of calling the Error Console in Firefox?
What convenience does the following JavaScript code snippet provide?
Which of the following is not a property of window object?
How to know the number of elements of a form?
Which function is used to serialize an object into a JSON string in Javascript?
What is the code to start displaying the time when document loads?
What is the code snippet to go back to a history thrice?
Which of the following is the correct output for the following JavaScript code:
Discusssion
Login to discuss.