Fat Arrow Functions JavaScript Programming Tutorial



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.

source

Reply


Build A Site Info