The JavaScript new.target meta property



The JavaScript new.target meta property

The JavaScript new.target meta property

There is a meta property on the `new` keyword that we can access from within functions and class constructors in JavaScript. We can use it to determine whether or not a function was called with the new keyword.

Code from video https://gist.github.com/prof3ssorSt3v3/98324bc895be33cfaa6e29c2eb308e14

Comments are closed.