Skip to content

Commit 74a7f6a

Browse files
authored
Merge pull request getify#1665 from henrebotha/patch-1
Fix grammar
2 parents 3fad406 + 4fdf7e0 commit 74a7f6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

get-started/ch2.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ greeting("My name is Kyle.");
4949

5050
In this program, the value `"My name is Kyle."` is a primitive string literal; strings are ordered collections of characters, usually used to represent words and sentences.
5151

52-
I used the double-quote `"` character to *delimit* (surround, separate, define) the string value. But I could have used the single-quote `'` character as well. The choice of which quote character is entirely stylistic. The important thing, for code readability and maintainability sake, is to pick one and to use it consistently throughout the program.
52+
I used the double-quote `"` character to *delimit* (surround, separate, define) the string value. But I could have used the single-quote `'` character as well. The choice of which quote character is entirely stylistic. The important thing, for the sake of code readability and maintainability, is to pick one and to use it consistently throughout the program.
5353

5454
Another option to delimit a string literal is to use the back-tick `` ` `` character. However, this choice is not merely stylistic; there's a behavioral difference as well. Consider:
5555

@@ -677,7 +677,7 @@ Inheritance is a powerful tool for organizing data/behavior in separate logical
677677

678678
### Modules
679679

680-
The module pattern has essentially the same goal as the class pattern, which is to group data and behavior together into logical units. Also like classes, modules can "include" or "access" the data and behaviors of other modules, for cooperation sake.
680+
The module pattern has essentially the same goal as the class pattern, which is to group data and behavior together into logical units. Also like classes, modules can "include" or "access" the data and behaviors of other modules, for cooperation's sake.
681681

682682
But modules have some important differences from classes. Most notably, the syntax is entirely different.
683683

@@ -862,7 +862,7 @@ forAgainstLet.print();
862862

863863
| NOTE: |
864864
| :--- |
865-
| The `as newBlogPost` clause in the `import` statement is optional; if omitted, a top-level function just named `create(..)` would be imported. In this case, I'm renaming it for readability sake; its more generic factory name of `create(..)` becomes more semantically descriptive of its purpose as `newBlogPost(..)`. |
865+
| The `as newBlogPost` clause in the `import` statement is optional; if omitted, a top-level function just named `create(..)` would be imported. In this case, I'm renaming it for readability's sake; its more generic factory name of `create(..)` becomes more semantically descriptive of its purpose as `newBlogPost(..)`. |
866866

867867
As shown, ES modules can use *classic modules* internally if they need to support multiple-instantiation. Alternatively, we could have exposed a `class` from our module instead of a `create(..)` factory function, with generally the same outcome. However, since you're already using ESM at that point, I'd recommend sticking with *classic modules* instead of `class`.
868868

0 commit comments

Comments
 (0)