Add missing semicolon in Arrow Functions (1-6-12)

This commit is contained in:
Muhammed Zakir 2021-02-01 21:42:48 +05:30 committed by GitHub
parent 97ef86242f
commit 4df24f3a08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ let group = {
*!* *!*
this.students.forEach(function(student) { this.students.forEach(function(student) {
// Error: Cannot read property 'title' of undefined // Error: Cannot read property 'title' of undefined
alert(this.title + ': ' + student) alert(this.title + ': ' + student);
}); });
*/!* */!*
} }
@ -87,7 +87,7 @@ For instance, `defer(f, ms)` gets a function and returns a wrapper around it tha
```js run ```js run
function defer(f, ms) { function defer(f, ms) {
return function() { return function() {
setTimeout(() => f.apply(this, arguments), ms) setTimeout(() => f.apply(this, arguments), ms);
}; };
} }