r/javaScriptStudyGroup • • Sep 27 '17

Why is !=== not valid JS?

I have always seen !== and never !===.

2 Upvotes

6 comments sorted by

View all comments

0

u/[deleted] Sep 30 '17

[deleted]

3

u/[deleted] Oct 04 '17

!= compares the values. !== Compares the values and data type

1

u/dhegde001 Oct 28 '17 edited Oct 29 '17

Sorry for being an ass here, but a more accurate way of putting what happens is that != checks for value non equality with coercion allowed and !== checks for value non equality without coercion being allowed.