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

> It's not possible to remove anything without potentially breaking backwards compatibility

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...



>In sloppy mode, a number beginning with a 0, such as 0644, is interpreted as an octal number (0644 === 420)

How does something like this even happens.

Anyway, if you "use" strict mode, but the browser doesn't support it, you're effectively not running in strict mode, so you can't actually assume the Javascript will execute differently.


Every version of a browser released after 2011 has supported strict mode.


Any code that works in strict mode will also work in sloppy mode.

0777 style octal numbers are a footguns inherited from C. Don't ask my why they made that mistake! Modern languages use 0o777.




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

Search: