Skip to content

Commit 6b296c1

Browse files
authored
new.target is undefined not empty
It is should be made know that `new.target` is `undefined` for regular function calls than say it is empty.
1 parent 468e355 commit 6b296c1

File tree

1 file changed

+1
-1
lines changed
  • 1-js/04-object-basics/06-constructor-new

1 file changed

+1
-1
lines changed

1-js/04-object-basics/06-constructor-new/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The syntax from this section is rarely used, skip it unless you want to know eve
9191

9292
Inside a function, we can check whether it was called with `new` or without it, using a special `new.target` property.
9393

94-
It is empty for regular calls and equals the function if called with `new`:
94+
It is undefined for regular calls and equals the function if called with `new`:
9595

9696
```js run
9797
function User() {

0 commit comments

Comments
 (0)