Skip to content

Commit 7ca5f53

Browse files
authored
"syntactic sugar" instead of "syntax sugar" (#1582)
"syntactic sugar" instead of "syntax sugar"
2 parents cd4def5 + 7e3e74f commit 7ca5f53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

1-js/09-classes/01-class/article.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ alert(User.prototype.sayHi); // alert(this.name);
116116
alert(Object.getOwnPropertyNames(User.prototype)); // constructor, sayHi
117117
```
118118

119-
## Not just a syntax sugar
119+
## Not just a syntactic sugar
120120

121-
Sometimes people say that `class` is a "syntax sugar" (syntax that is designed to make things easier to read, but doesn't introduce anything new), because we could actually declare the same without `class` keyword at all:
121+
Sometimes people say that `class` is a "syntactic sugar" (syntax that is designed to make things easier to read, but doesn't introduce anything new), because we could actually declare the same without `class` keyword at all:
122122

123123
```js run
124124
// rewriting class User in pure functions
@@ -140,7 +140,7 @@ let user = new User("John");
140140
user.sayHi();
141141
```
142142

143-
The result of this definition is about the same. So, there are indeed reasons why `class` can be considered a syntax sugar to define a constructor together with its prototype methods.
143+
The result of this definition is about the same. So, there are indeed reasons why `class` can be considered a syntactic sugar to define a constructor together with its prototype methods.
144144

145145
Still, there are important differences.
146146

0 commit comments

Comments
 (0)