0
Using 'this' in strict mode
Why does this returns undefined while using strict mode? 'use strict'; function test() { console.log(this) } test()
2 Respuestas
+ 1
this represents current object but you don't have any object in strict mode.
If you comment that line then current object would be 'window'
+ 1
Oh yes! I didn't thought about it..