Mauricio Robayo's Blog

Mauricio Robayo's Blog

JavaScript `this` inside `setInterval`

Jul 23, 20211 min read 19 views

When the function is called, it is called using the new keyword. One of the things the new keyword does is that it "binds the newly created object instance as the this context". We can test the following snippet of code to verify the value of this wh...