Merge pull request #2425 from sarscode/sarscode-constructor-new-target

new.target is undefined not empty
This commit is contained in:
Ilya Kantor 2021-01-11 15:12:37 +03:00 committed by GitHub
commit b9d5335b1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,7 +91,7 @@ The syntax from this section is rarely used, skip it unless you want to know eve
Inside a function, we can check whether it was called with `new` or without it, using a special `new.target` property.
It is empty for regular calls and equals the function if called with `new`:
It is undefined for regular calls and equals the function if called with `new`:
```js run
function User() {