Odoo Technical

Welcome!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

What is the difference between the '==' and '===' operators in JavaScript?

Avatar
Selvanayagi

What is the difference between the '==' and '===' operators in JavaScript?

Avatar
Discard
1 Answer
0
Avatar
pavithra
Best Answer

Language: JS (Window instance )

   ==  && === 

1. == - The == operator compares two values for equality, but not compare datatype.

2. === - It checks for both value equality and type equality.

Example:

    if (1 == '1') O/P  True
    if (1 === '1') O/P False
Avatar
Discard