Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?



No, because you have to use the new 'let' keyword to get block scoping. So you have to opt-in to it.


It's just for "let" AFAICT.


Only for let, const, class, and function in block. Like the slide says!




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: