GeezerVison is showing github.com — Grammar fixes. · VinceHu/javascript@d35dc3b
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: functions/declare.md +2-2Lines changed: 2 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | # Declaring Functions |
2 | 2 |
|
3 | | -Functions, like variables, must be declared. Let's declare a function `double` which accepts an **argument** called `x` and **returns** the double of x : |
| 3 | +Functions, like variables, must be declared. Let's declare a function `double` that accepts an **argument** called `x` and **returns** the double of x : |
4 | 4 |
|
5 | 5 | ```javascript |
6 | 6 | function double(x) { |
7 | 7 | return 2 * x; |
8 | 8 | } |
9 | 9 | ``` |
10 | 10 |
|
11 | | -Functions are also values in JavaScript: they can be stored in variables (just like numbers, strings, etc ...) and given to other functions as arguments : |
| 11 | +Functions are also values in JavaScript; they can be stored in variables (just like numbers, strings, etc ...) and given to other functions as arguments : |
12 | 12 |
|
13 | 13 | ```javascript |
14 | 14 | var double = function(x) { |
|