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

this also has some really fun rules that are useful for mad science sometimes. For example, you can recover the JS context's global value via this:

    (function() { return this })()
In a browser this resolves to the window object. In nodejs it resolves to the global object. I've used this a few times to help write isomorphic javascript bundles, though its much less useful than it once was.


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

Search: