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

In JS, functions can refer to variables defined in outer scopes, and can refer to variables defined in outer functions even after those functions have returned. JS functions are first-class objects.

They also store any variables they may refer to that are defined in their enclosing scopes, including the parameters and variables of outer functions.



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

Search: