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

Yeah, where right now you must use a self-invoking function, the let keyword would imitate that behavior with just {}'s. Less typing.

The only difference is there's no way to return a value from the blocks because this: var name = { return 'Awesome' }

...wouldn't work because, besides return being only for functions, when you use the = it assumes an object literal and throws a syntax error.



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

Search: