Skip to content

Commit 98d0c2c

Browse files
authored
Merge pull request #3201 from MindLaborDev/patch-1
Omitting parentheses after `new`
2 parents c8b4d34 + 1b87b89 commit 98d0c2c

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ alert( new SmallUser().name ); // John
171171
Usually constructors don't have a `return` statement. Here we mention the special behavior with returning objects mainly for the sake of completeness.
172172

173173
````smart header="Omitting parentheses"
174-
By the way, we can omit parentheses after `new`, if it has no arguments:
174+
By the way, we can omit parentheses after `new`:
175175
176176
```js
177177
let user = new User; // <-- no parentheses

0 commit comments

Comments
 (0)