+ 1

How is "===" working with object and why should we use it?

This "===" sign has been puzzling me for long, and I am wondering how it works with object (with multiple properties) and when to use it. Why not use a simple "=="?

11th Feb 2017, 5:36 AM
Peter Kellighan
Peter Kellighan - avatar
2 odpowiedzi
+ 3
tests for type and value and results to true if type AND value matches.
11th Feb 2017, 6:33 AM
Andre van Rensburg
Andre van Rensburg - avatar
+ 1
In addition to the other answer, if you want to save yourself the hassle - just use == instead of === for checking if something is equal without worrying about it being equal in both type and value
11th Feb 2017, 11:18 AM
Tay
Tay - avatar