In many place, I've seen that there is used the expression if (value === expression)
rather than if (expression === value)
.
For example, In php we use-
if (false === strpos('abc', 'a'))
And also I see after minifying JavaScript, the minified file also generated like this.
So my question is, what is the benefit of value === expression
over expression === value
?
Note: This question may be redundant but I may not get the proper keywords for searching. If it is duplicated then I am ready to close the question.