Anonymous Fat Arrow Functions JavaScript Programming Tutorial

preview_player
Показать описание
Crash course on using the new Arrow functions in JavaScript, introduced in ECMAscript Edition 6 to provide a new approach to writing anonymous functions. Arrow functions have 2 major advantages over traditional anonymous functions. (a) They reduce the amount of code you need to write. (b) In object oriented programming, the "this" keyword always refers to the object no matter how many anonymous functions are nested in the class. We will demonstrate these concepts through code right now starting with the most basic.

They are Anonymous functions. Anonymous functions are functions that have no name like normal functions do. We see them used as parameters in methods that expect exectuable code as an argument. Anonymous functions are used in object oriented programming, or they are sometimes supplied as the value of a named variable.

We will compare traditional Anonymous function syntax with arrow function syntax side by side using several simple examples in order to demonstrate where, when and how to use arrow functions where you normally use anonymous functions.
Рекомендации по теме
Комментарии
Автор

Wow a tutorial on notepad ++ made in 2015 just explained arrow syntax so much better than any tutorial I've watched so far. Completely understand it's use and why it's important now, thank you so much!!

user
Автор

You are the best one ever who explained this ES6 Arrow Function, Thanks a million you have made my day.

ga
Автор

Amazing and simple. You explained something in 12 minutes that somebody in an hour isn't capable of...

GameNon-Quitters
Автор

i chcd all over youtube and they bubbled around the arrow function for 20 mins per video failing to explain anything, you rock bro

LoktionBanger
Автор

Thanks, Adam, for the video. It helped a lot.

I like the new fat arrow function, but I'm not a big fan of omitting () when there is only one variable passed to an anonymous function.

Seeing () or (…) makes it stand out more as a function, especially during transition to this new feature. It's more explicit, but still more brief than the original syntax.

Where I really see this feature stand out is the fact it is truly "anonymous" (i.e. not having its own "this"), without having to work around it with clunky "self" or "that" code, which is certainly not more readable or intuitive.

Thanks, again.

michaelk
Автор

Watching this video for the interview purpose. Most clear explaination of context (this) problem. Thanx buddy

navidansari
Автор

You are way better than the hour long tutorials.

coows
Автор

AK you are a legend. Definitely in my top 5 gurus, Thanks for explaining this clearly

aaronr
Автор

thank you so much for explaining
no one explained it as good as you

xnnr
Автор

Very informative without a lot of jibba jabba. Well done.

brianfabrizio
Автор

Clear and informative! The new syntax seems a lot clearer and it’s more efficient to type.

jdevcast
Автор

Thank you so much. I've been learning from your videos for years now nd I have been greatly blessed by them. Thank you for sacrificing your time to teach us.

victorighalo
Автор

Basically it's all come down to the fact that a "this" in anonymous function doesn't follow the lexicon scoping, but "this" in a anonymous function refers to the global object, that's why the for the lexicon scoping the arrow function make the task easier

lazylizarts
Автор

please do more ECMA6 script tutorials based

it's very interesting, but so far, I didn't know how to use them :D

CristianAlexandruRadu
Автор

Very well presented. You are a very good teacher! thank you.

chaturanga
Автор

Thank you! This pushed my thinking to understand this concept better.

LEGnewTube
Автор

This is a great tutorial. On a different note though, arrow functions make code so much harder to read, which bearing in mind we all spend so much more time reading code than we do typing code, I don't think the arrow function is the great addition to the language a lot of people think it is going to be.

emilyandrews
Автор

Thank you Sir! You explained the theory crystal clear! Again, I thank you!

martinsin
Автор

Thank you, buddy. Great video, easy to understand for novices.

coltoncolcleasure
Автор

Thank you for an elegant and simple explanation!

romansemchuk
join shbcf.ru