by codecurve · 11y ago · 0 comments
I didn't have to box anything to pass a primitive as this. Maybe some other versions are different, but this works in Chrome 40 and Firefox 33.
> function isboxed() { return this instanceof Number; } > isboxed.call(5); true
> var isboxed = (function() {"use strict"; return function isboxed() {return this instanceof Number;}}()); > isboxed.call(5); false