Mid JavaScript

What are arrow functions?

Arrow functions are a shorter syntax for writing functions and do not have their own

this.

Example:

const add = (a, b) => a + b;

console.log(add(2, 3)); // 5

More from JavaScript Tutorial

All questions for this course