Skip to content

Category: ECMAScript6

Arrow functions

I’m pretty impressed with Arrow functions in ECMAScript6. An Arrow function is very simple when compared to traditional function expressions. Arrow functions are always anonymous and do bind its own this, arguments, super and new.target properties. So, we can simply say Arrow functions are shorter functions and non-binding of this. Let’s begin with exploring shorter functions. To experiment shorter functions, we shall start creating a traditional function and then later we shall replace it with Arrow functions. var fruits = [‘mango’, ‘jack fruit’, ‘banana’]; var a = fruits.map(function (f) {… Read more Arrow functions