I love JavaScript - and to be fair I ignored these regular posts of people throwing garbage data at it and calling it names due to some questionable results.
Todays debug session lead me to the following assertion.
Todays debug session lead me to the following assertion.
'1' === new String(1)
To my surprise, this evaluates to false.
While the lesson learnt here should be String objects and String literals are not the same, I must admit I was reminded of these posts ridiculing JS. Justified so, because - to me - this doesn't seem to be garbage input.