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

You can also use blocks this way in C, Java, etc.


However, in C and Java they're actually useful because they delimit variable scope. In JavaScript I'm not aware of any use for them.


EcmaScript is working on growing a way to indicate block scope with "let" as mentioned elsewhere in this thread.




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

Search: