andrewsw, on 11 January 2013 - 12:04 PM, said:
It even seems that (1234) + '' may even be slower than (1234).toString(), which seems strange.
why should that be strange?
(1234).toString() does two steps:
- coercing the number literal into a Number onbject
- calling .toString()
(1234) + '' does (at least) 3
- coercing the number literal into a Number onbject
- calling .toString()
- make the concatenation

New Topic/Question
Reply



MultiQuote



|