3 ms·
So good to see String.prototype.startsWith and String.prototype.endsWith in ES6. I've ended up implementing these in too many projects. I look forward to using
by arenaninja 11y ago
So good to see String.prototype.startsWith and String.prototype.endsWith in ES6. I've ended up implementing these in too many projects. I look forward to using these in 2020 or 5 years after that, when IE 8 finally sunsets. (I joke of course, since you can use ES6 to 5 with IE 8 caveats with the modern taskrunners).
EDIT: Blockscope... what? More than a few of these changes point to JS being a functional version of PHP, but doesn't blockscope just fundamentally change the language?
- atonse 11y agoNo, because you have to use the new 'let' keyword to get block scoping. So you have to opt-in to it.
- albemuth 11y agoIt's just for "let" AFAICT.
- BrendanEich 11y agoOnly for let, const, class, and function in block. Like the slide says!