HN2new | past | comments | ask | show | jobs | submitlogin

On further inspection, it must be a constructor.

The second case is incorrect. The function assigns to "this", which would be undefined in strict mode, or the global object. Very bad either way.

Remember kids: objects are your friend.



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

Search: