TripleTen

PHOTO EMBED

Thu Dec 28 2023 08:29:12 GMT+0000 (Coordinated Universal Time)

Saved by @Marcelluki

When to Use
In situations where the this keyword isn't being used inside the body of a function, do what you think is best! For instance, it's quite convenient to use arrow functions in callbacks because of their short syntax:
Copy code
JAVASCRIPT
const numbers = [2, 3, 5];
const doubledNumbers = numbers.map(number => number * 2);

console.log(doubledNumbers); // 4, 6, 10 
content_copyCOPY

https://tripleten.com/trainer/web/lesson/399bc4a1-0594-4a30-a0d1-06652b612602/task/4368d671-ee8f-4f84-b9a5-42963f804407/