Skip to main content

Edit It: Use new.target to confirm if the new operator invoked the constructor

This code shows how to use new.target to confirm if the new operator invoked a constructor.

See it on StackBlitz