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

See this answer: http://news.ycombinator.com/item?id=5269731

In the second, the var myFunction gets hoisted to the top but not the function definition, which is why calling it produces an error. In the first, the whole function gets hoisted to the top.



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

Search: