var test = {
literalLogger: function() {
console.log('literal')
console.log('this: ', this)
},
arrowLogger: () => {
console.log()
console.log('this: ', this)
},
nestedArrowLogger() {
this.arrowLogger();
}
}
The first function logs this as the object. The second function logs this as the window. The third function logs this as the window.Why?