+ 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 "=="?
2 odpowiedzi
+ 3
tests for type and value and results to true if type AND value matches.
+ 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