JavaScript ES6 - Arrow Functions

preview_player
Показать описание
This video will show you everything you need to know about ES6 arrow functions including a major gotcha!
Рекомендации по теме
Комментарии
Автор

Awesome series. Thanks for putting it together.

InhumanBean
Автор

Your videos are cool man, I'm a js developer and I just came by running bumping into some videos and you're explanations and examples are very well detailed. I hope you keep this up because I learned programming from videos like this in YouTube. Keep up the good work, try teaching complex things too like redux-saga and actually using those generator functions for promises and other api calls.

aprilpineda
Автор

dude thank you so much. thank you thank you thank you

niggafromcompton
Автор

If we look at this block of code

```
function addOne() {
this.sum = 0;
this.toAdd = 1;
return function add() {
return (this.sum + this.toAdd);
}()
};

console.dir(addOne());
// Output 1
```
Why does the function add have access to this.sum and this.toAdd, yet this.age inside setInterval() doesn't have access to this.age inside Person?

Is it because setInterval was defined global?

jasdnbsad
Автор

why using var, you recommended to not use it

ericellison
Автор

7:12 line number 4 has a syntax error. Try removing the function name.

eddie
welcome to shbcf.ru