Inspectopedia
 
2024.3

Function expression is used instead of arrow function

Info
Code Style
New
Last modified: 03 December 2024

Reports a function expression. Suggests converting it to an arrow function.

Example:

arr.map(function(el) {return el + 1})

After applying the quick-fix the code looks as follows:

arr.map(el => el + 1)