what is this in javascript
// this = current execution context (window in browser, global in nodejs)
console.log(this) // window object
function foo () {
console.log(this); // object calling this function
}
foo(); // undefined
o={ foo }
o.foo(); // 'o' object logged