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

It is a statement block. You need to say

    f => ({ pizza })
to get an object literal. This isn't that hard to understand.


But it's easy to forget, just once. For example:

    x => () => {}
    x(); // undefined instead of empty object
This can lead to immediate syntax bugs, eventual errors throws and silent semantic errors.

Which reinforces the whole argument that they should think a bit harder about all the new features.




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

Search: