Skip to content

Commit cbb2167

Browse files
authored
Change brackets to parentheses
From my experience brackets are {}. () are referred to as parentheses, or perhaps "round brackets" but that would be too wordy.
1 parent c6271b5 commit cbb2167

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,16 +162,16 @@ alert( new SmallUser().name ); // John
162162

163163
Usually constructors don't have a `return` statement. Here we mention the special behavior with returning objects mainly for the sake of completeness.
164164

165-
````smart header="Omitting brackets"
166-
By the way, we can omit brackets after `new`, if it has no arguments:
165+
````smart header="Omitting parentheses"
166+
By the way, we can omit parentheses after `new`, if it has no arguments:
167167
168168
```js
169-
let user = new User; // <-- no brackets
169+
let user = new User; // <-- no parentheses
170170
// same as
171171
let user = new User();
172172
```
173173
174-
Omitting brackets here is not considered a "good style", but the syntax is permitted by specification.
174+
Omitting parentheses here is not considered a "good style", but the syntax is permitted by specification.
175175
````
176176

177177
## Methods in constructor

0 commit comments

Comments
 (0)