Arrow function is a
different way of defining
a function.
Let's convert the
function displayValidationError
from the previous chapter
to an arrow function:
Arrow function
is basically an expression
assigned to a variable.
In the example above,
the arrow function
is assigned to the variable
displayValidationError
.
The Arrow function
expression starts with
the parentheses ()
,
followed by the
arrow operator =>
,
and the function body.
Moving forward,
in the Academy,
we'll be using
Arrow Functions
for defining functions.