What is the difference between identical (===) and equal (==) operators? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is the difference between identical (===) and equal (==) operators?

20th Dec 2016, 9:33 AM
Wilson Bol
Wilson Bol - avatar
4 Answers
+ 6
== same value === same value and type
20th Dec 2016, 9:46 AM
Gabe Rust
Gabe Rust - avatar
+ 4
equal n strictly equal
8th Jan 2017, 12:01 PM
Emmanuel Meena
Emmanuel Meena - avatar
+ 2
Using (==) only tests for value. No matter what type, it will be true if the values are equal. With (===), both values must be the same DATA TYPE to return true.
20th Dec 2016, 10:35 AM
Gabe Rust
Gabe Rust - avatar
0
The = (assigment operator) , == and === (relational operator) please explain the diffenerce between these 3 operators in javascript;along with relevant examples.And what do we mean by type type conversion in===,please explain with example.And why does 3==='3'//false 3==="3"//false "3"==3//true 3===3//true also why does 3==3//true "3"==3//true 3=='3'//true 1==true//true
20th Dec 2016, 10:29 AM
Abdelaziz Abubaker
Abdelaziz Abubaker - avatar