Originally Posted by felgall
what difference does it make how the conditional is internally decoded?
The conditional's true/false result is the same either way under any scenario my feeble mind can imagine.
if you wanted the string to become a number, simply add "+" to the equation: (+'9'==9). this forces a numerical conversion upon the string just before the comparison is assessed.
i think one of the reasons people make mistakes like that in JS is because they used old-fashioned static typed languages first. boo on them. For people who start in JS, i don't see those mistakes happening very often. 1989 was a long time ago, let's all get our mental models caught up to dynamic data representation.
BROWSER STATS [% share]
(2013/10/31) IE7:0.5, IE8:8.6, IE9:5.3, IE10:12.3, FF:17.7, CH:41.8, SF:8.1, MOBILE:20.4