Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
22
rated 0 times [  25] [ 3]  / answers: 1 / hits: 29834  / 14 Years ago, tue, august 24, 2010, 12:00:00

Possible Duplicate:

Javascript === vs == : Does it matter which “equal” operator I use?






Looking into the answer of Chris Brandsma in Advanced JavaScript Interview Questions what is === in Javascript.



If possible please provide a simple example


More From » javascript

 Answers
111

=== is the strict equal operator. It only returns a Boolean True if both the operands are equal and of the same type. If a is 2, and b is 4,



a === 2 (True)
b === 4 (True)
a === '2' (False)


vs True for all of the following,



a == 2 
a == 2
2 == '2'

[#95834] Friday, August 20, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
raveno

Total Points: 453
Total Questions: 92
Total Answers: 92

Location: France
Member since Thu, Oct 27, 2022
2 Years ago
raveno questions
;