I am writing some codes for myself just to learn JS better and I was wondering if there is any difference in negation condition in if statement with an operator which compares two values or with operator which negates whole condition.
The first one is like this:
if(value != 'foo') {}
And the second one:
if(!value == 'foo') {}
Is any of them better, more appropriate?
Thanks!
Aucun commentaire:
Enregistrer un commentaire