Skip to content
Latest: Publish JavaScript Packages to NPM Like a Pro!

Edit It: Does omitting the new keyword cause the constructor's this keyword to reference the global object?

Home>new Operator in JavaScript>Edit It: Does omitting the new keyword cause the constructor's this keyword to reference the global object?

Edit It: Does omitting the new keyword cause the constructor's this keyword to reference the global object?

This code shows that omitting the new keyword makes a constructor's this keyword reference the global object.

See it on StackBlitz