+ 3
What is the difference between == and === operator in javascript
Javascript ===
7 odpowiedzi
+ 5
Both == and === compare two values for equality. The only difference is that === also compares the type of the two values.
For eg:
1 == "1" returns true because JavaScript does automatic type conversion. However this might not be useful in most cases.
1 === "1" returns false, as expected, since a string cannot equal an integer. So you probably should use === unless you have a good reason for using ==
+ 26
== is equal to
=== is equal value and equal type
+ 3
@mr.nobody No problem. I'm glad I could help☺. I wouldn't say I'm talented at all, I just keep practicing. Do the same and you'll get much better at programming 👍.
+ 2
The operator == compares to equality, but === - to identity.
+ 1
Nihar Raote, your explain is very understandable and nice, it's must be talent to explain like this. thanks :-)
+ 1
good advice thanx
0
Very good question. Thanks