.@jedschmidt just disproved another stodgy JS "rule" (never use 'new String') #webrebels
-
-
-
Replying to @rauschma
@rauschma@jedschmidt@mathias objects have identity new String('a') === new String('a') //false 'a' === 'a' //true3 replies 4 retweets 4 likes -
Replying to @angustweets
@angustweets@rauschma@jedschmidt@mathias why not just: { toString: function () { return "Mathias" } } it also assures identity2 replies 0 retweets 1 like
Replying to @medikoo
@medikoo But perhaps the object literal approach is more explicit / clearer. Hmm… +@angustweets @rauschma @jedschmidt
5:12 AM - 23 May 2014
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.