created by Brian LeRoux & Andrew Lunny. sparodically uncurated by David Trejo.

2010 02 15 scope fun

@kriskowal, of CommonJS fame, points out lexical scoping could solve this issue. Ah, JavaScript you are a dirty little language. Dirty dirty…slut! Ya you like those global variables… aaaaaw yah…

    Object.prototype.foo = 10; 
    console.log(foo); // 10
Fork me on GitHub