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

In JavaScript, implicit varible declarations goes to the global scope, which is obviously a footgun. In python they go to the local scope as you would expect.


Going to local scope is obviously better, but it still allows misspellings (some of which are very difficult to see) to create new variables and have code that looks like it works but does something entirely different to what you expect.




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

Search: