3 ms·
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
by tantalor 14y ago
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.