Lesson Code: http://www.developphp.com/video/JavaScript/Fat-Arrow-Functions-JavaScript-Programming-Tutorial
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.
Amazon Auto Links: No products found.
very clearly explained, i liked it, thanks Adam 😀
And then he realized; “var _ = x = document.getElementById(x);”
thank you too much , great explanation for a major annoying aspect of javascript coding .
Awesome explanation !!
Thanks!
Great explanation! thanks!
Explained very well. Fantastic.
That was very clear and understandable. Thanks!!
Which website can i read more about this?
Such great content. Thank you so much for taking the time to create it. Do you happen to have a patron to support your work? Thanks
Excellent!!!! Thanks you very much : )
Nice explanation!
But i have to say, that I’m hating all these new fancy syntaxes.
I’m pretty sure the world is much better off without them, and all other changes
Could it be because I’m over 40?
I guess we will never know.
Awesome, good job!
Awesome tutorial Adam…
looks exactly the same as lambda expression in C#. Can I call it like that cause I got used to it or it’s wrong? Another thing is that you have mentioned it may be not supported in older browsers. Can I use it when writing my JS or not really cause older browsers will not run it? If I can’t what is the point of using it?
I wish I could see the disliker just so I knew if it was a bot or a troll or maybe a just a pessimist. I think it’s much more productive to find the videos you like and then like them, unless the video is extremely or very bad, you should not dislike.
P.S. I also really enjoy these videos please make more.
can you make a tutorial on image upload database but datatype in databse is longblob or show image from databse……and store 5 image at a time and show 5 image
In your opinion sir Adam. Which I must focus to study function() or () => …
Thank you for the tut sir!
Thanks for the info… I am writing some scripts for my pages and this will come in handy. Thanks again.
Simply excellent, thaks!
Great explanation! Thanks for making this video!
this is lovely,now my problem of icons have been solved.thanks my web master
I see you started using Notepad++ instead of that crappy Dreamweaver 🙂
cool man, well explained!! thanks!
Thank you very much!
why did you use notepad ++ ?
Thank you for an elegant and simple explanation!
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.
Thank you, buddy. Great video, easy to understand for novices.
Well explained sir, thanks a lot
Nice job, very clear and concise
you are great guy love your tutorials
thanks for this tutorial.
but…
(due to a stupid miss-click, i lost what i was just typing, so try 2) not impressed with the way they continue to “fix” or “update” this stuff…
another shorthand thing?
well…alright…
does it really affect performance is the question…
I somehow doubt it will help with the massive and resource-intensive scripts that most websites now run.
And then how these arrow functions magically recognize the correct reference to “this” …
What I see /hear of this usage is: “don’t use this old, dirty hack. Use this new and improved, gold-plated one, instead!”
Seems to me it’d make more sense to make the existing functions behave properly, instead… >.>
Whether or not it’s more compact, or performs better… at the end of the day, it’s simply another hack to learn, and more confusion to be had.
Also another feature to have its standardization and implementation varied in some way.
This feature sounds more like depreciating the html tag with the tag, that behaves EXACTLY THE SAME, than any real improvement. The only difference here is the replacement has like one difference in functionality that is beneficial to the still very hacked-together way that JavaScript implements OOP.
I’m glad people like you exist, to explain these things clearly, but overall, I’m not impressed with the latest, poorly documented, and selectively implemented “standards” that keep popping-up. This is one reason many game devs especially continue to use Flash, it’s less convoluted, and for the most part, Adobe doesn’t re-invent the wheel and create hacks to repair bugs. They actually UPDATE their code, fix the bugs, and overall, improve their system. IDK what exactly the W3C and other organizations that literally govern how websites and web content should be developed are thinking, but I question the bulk of it. They continue to deliver a half-baked product and expect everyone to just buy right into it. They claim Flash and Java are outdated and obsolete, but these languages by far continue to evolve much more than their own, ANCIENT languages.
I’ll keep what you’ve just explained in mind, but I feel there are a few other updates JavaScript needs a LOT more than these new arrow functions.
Nice tutorial. Thanks you rockstar!
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.
is it true that ES6 VAR should be Let whenever possible?
nice tutorial man. Did you get babel to work? LOLs. Well you can upgrade to windows 10 and edge should have es2015 working.
Hi @Adam, Isn’t Car a constructor function(not class) in javascript?
Awesome very clear thanks
looks like lambda expression.
Lambda..nice
Great tutorial!
You made the hard simple! Great thanks!
please do more ECMA6 script tutorials based
it’s very interesting, but so far, I didn’t know how to use them 😀
can you make a tutorial on image upload database but datatype in databse is longblob or show image from databse……and store 5 image at a time and show 5 image
Subbed, great video, helped a lot!
nice
Your tutorial was excellent except executable is pronounced ExE_CUTE_ABLE. You are a genius. Do you have any tutorials on http transactions?
Very clearly exposed. Congratulations!