Question: Why is the expression 2 = = 2 is true in JavaScript? Question 1 2 options: A . String is coerced to a number B

Why is the expression 2==2 is true in JavaScript?
Question 12 options:
A. String is coerced to a number
B. No coercion is done on the operands
C. JavaScript considers string and number as equal by default
D. Both A and C

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!