TIL: `1..toString()` is valid JS.
h/t @bakkoting
Why not? It could work if we make slice ranges only accept integer literals.
-
-
I don't see why we should restrict it to integer literals, though? I see several uses of Array.prototype.slice being called with non integer literals in the Google code base
-
But... why?
- 7 more replies
New conversation -
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.