10000 Merge pull request #30 from MaxDavila/master · possiblecode/art-of-node@a2cd573 · GitHub
[go: up one dir, main page]

Skip to content

Commit a2cd573

Browse files
committed
Merge pull request max-mapper#30 from MaxDavila/master
Added missing word 'as' on line 190
2 parents 6077ddf + a4b3cb5 commit a2cd573

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function logMyNumber() {
173173
addOne(logMyNumber)
174174
```
175175

176-
Now the `logMyNumber` function can get passed in an argument that will become the `callback` variable inside the `addOne` function. After `readFile` is done the `callback` variable will be invoked (`callback()`). Only functions can be invoked, so if you pass in anything other than a function it will cause an error.
176+
Now the `logMyNumber` function can get passed in as an argument that will become the `callback` variable inside the `addOne` function. After `readFile` is done the `callback` variable will be invoked (`callback()`). Only functions can be invoked, so if you pass in anything other than a function it will cause an error.
177177

178178
When a function gets invoked in javascript the code inside that function will immediately get executed. In this case our log statement will execute since `callback` is actually `logMyNumber`. Remember, just because you *define* a function it doesn't mean it will execute. You have to *invoke* a function for that to happen.
179179

0 commit comments

Comments
 (0)
0