JavaScript Arrow Function was introduced in ES2015 (More commonly referred to as ES6). Arrow functions have more concise syntax for writing function expressions. Arrow Functions are one of the most effective changes in ES6/ES2015, and they are widely used nowadays. Arrow functions were introduced in ES6 / ES2015, and since their introduction in JS, they changed how JavaScript code looks and works forever.

Javascript Arrow Function

Arrow Functions have two main benefits which are the following.

  1. A shorter syntax then typical javascript functions.
  2. No binding of this keyword.

Let us see the traditional function syntax.

function funcName() {
   // func body
}

funcName()

#javascript #js

Javascript Arrow Function Example | ES6 Arrow functions
1.55 GEEK