DEV Community

Discussion on: Understanding "this" in JavaScript

Collapse
 
naimlatifi5 profile image
Naim Latifi • Edited

Hello guys

Thanks for pointing this out and you are both right, by default it should output hello undefined but here I run the code in a strict mode which was my mistake I forgot to mention it(now edited and corrected ). So running this in strict mode it will throw an exception and output with TypeError :)