Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dhconnelly
on Feb 14, 2012
|
parent
|
context
|
favorite
| on:
JavaScript: Warts and workarounds
You can also use blocks this way in C, Java, etc.
sophiebits
on Feb 14, 2012
[–]
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.
bzbarsky
on Feb 15, 2012
|
parent
[–]
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: