arrow function instead of function

example code involves arrow function, not just function
This commit is contained in:
lumosmind 2019-10-30 13:20:11 +03:00 committed by GitHub
parent 601d9583f7
commit 04893aef31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,7 +61,7 @@ So, this will also work:
setTimeout("alert('Hello')", 1000); setTimeout("alert('Hello')", 1000);
``` ```
But using strings is not recommended, use functions instead of them, like this: But using strings is not recommended, use arrow functions instead of them, like this:
```js run no-beautify ```js run no-beautify
setTimeout(() => alert('Hello'), 1000); setTimeout(() => alert('Hello'), 1000);