How do you convert a regular function into an arrow function in JavaScript?
Use the arrow() keyword before the function name.
arrow()
Enclose the function code in curly braces {}.
{}
Use the function() keyword instead of function.
function()
function
Remove the function keyword and use the => syntax.
=>