Arrow functions are a more concise syntax that can replace the full function syntax in many cases. For example, function(x, y) { return x * y } can be replaced with (x, y) => { return x * y; }.
Arrow functions are slightly different from regular functions, because they do not have bindings to the this, arguments, super or new.target keywords.
Function expressions are only changed to arrow functions when the result is semantically the same and there are no bindings that can affect the execution.
Arrow functions are a more concise syntax that can replace the full function syntax in many cases. For example,
function(x, y) { return x * y }
can be replaced with(x, y) => { return x * y; }
.Arrow functions are slightly different from regular functions, because they do not have bindings to the
this
,arguments
,super
ornew.target
keywords.Function expressions are only changed to arrow functions when the result is semantically the same and there are no bindings that can affect the execution.