
Asked in Korecent Solutions and 34 others
Explain the difference between == and === in JavaScript?

AnswerBot
2mo
In JavaScript, '===' checks for strict equality, while '==' checks for loose equality, allowing type coercion.
'===' checks both value and type, while '==' checks only value after type conversion.
Examp...read more
Anonymous
2y
== compares value only.
=== compares datatype and values.
Anonymous
2y
The == operand loosely compares two values, thus it can be used in cases where the data type of the operand isn't important. For e.g., imagine a form entry where you've asked students their roll no. I...read more
ramkrish_. rl
3y
== is used for comparing two variables, but it ignores the datatype of variable.
=== is used for comparing two variables, but this operator also checks datatype and compares two values.
Parthiban pandurangan
3y
Both condition should be satisfied.
Add answer anonymously...
Interview Questions from Popular Companies

3.7
• 8.8k Interviews

4.0
• 5.5k Interviews

3.5
• 4.2k Interviews

3.6
• 8k Interviews

3.7
• 6k Interviews

3.7
• 6.2k Interviews

3.5
• 4.2k Interviews

3.7
• 5.1k Interviews
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

