ga-wdi-boston / js-function-context-this

Other
0 stars 126 forks source link

Address `'use strict';` #40

Closed gaand closed 7 years ago

gaand commented 7 years ago

This shouldn't be an aside, it should be the focus:

const foo = function () {
  'use strict'
  console.log('this', this)
}
foo()

prints this undefined to the console, not the object global/window.

MicFin commented 7 years ago

Check webpack and global window object as global this