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

I got a little tripped up because I tried to assign a literal object to a name.

e.g.

    name = { foo: 1 } 
doesn't work. I ended up doing:

    name = { return { foo: 1} }
but after your explanation, I guessed that this would also work:

    name = ({ foo: 1})


Yep!




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

Search: