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

In regards to global references, this guide suggests not to use the window prefix but doesn't really explain why except to note that it's unnecessary. I am guessing this is because window is not available if the js is running outside the browser. But if the code is intended to be run in the browser and won't work elsewhere I prefer adding the prefix to signal that.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: