Merge pull request #1086 from K-Sato1995/patch-10

Fix Grammer
This commit is contained in:
Ilya Kantor 2019-06-27 08:50:10 +03:00 committed by GitHub
commit e0def22946
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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