This is a basic stuff but I found it worth sharing with you all. I observed that a code compression utility changed a code fragement where a condition is written like,
if(document.getElementById('foo').value == '6')
to
if('6' == document.getElementById('foo').value)
In what way would that help?
It’s to avoid an assignement and get an error if you miss one of the two
=.won’t pass (assigning to a literal), but
will silently fail.