Created | Urls | Favourites | Opened | Upvotes | Comments |
0 | 0 | 206 | 0 | 0 |
Arrow Functions are one of the best new features of ES6 and are very alike to c# lambda.
Example 4 :
ES5 :
var circleArea = function circleArea(r) {
return 3.14 * r * r;
};
console.log(circleArea(7));
ES6 :
let circleArea = r => 3.14*r*r;
console.log(circleArea(7));