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

The variables are the same. Var statements get hoisted to the beginning of the function.

That said, it is cleaner to only 'var' each variable once, to suppress this confusion.



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

Search: