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.
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.