Expressions and patterns

new.target

Try the free JavaScript compiler

Meta-property available in function or constructor contexts that identifies the target of construction. Ordinary non-construction calls have undefined new.target; arrows inherit the surrounding context.

Formal Syntax & Structure

javascript syntaxjavascript
new.target

Working Example

Example Snippetjavascript
function F(){console.log(new.target===F);}F();new F();
JavaScript Reference