Fix Grammer
This commit is contained in:
parent
1191dbb395
commit
52e0988088
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ Novice developers sometimes make a mistake by adding brackets `()` after the fun
|
|||
// wrong!
|
||||
setTimeout(sayHi(), 1000);
|
||||
```
|
||||
That doesn't work, because `setTimeout` expects a reference to function. And here `sayHi()` runs the function, and the *result of its execution* is passed to `setTimeout`. In our case the result of `sayHi()` is `undefined` (the function returns nothing), so nothing is scheduled.
|
||||
That doesn't work, because `setTimeout` expects a reference to a function. And here `sayHi()` runs the function, and the *result of its execution* is passed to `setTimeout`. In our case the result of `sayHi()` is `undefined` (the function returns nothing), so nothing is scheduled.
|
||||
````
|
||||
|
||||
### Canceling with clearTimeout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue