Arrow function is way of writing ja
Arrow function is way of writing ja
Arrow function
introduced in ES6 Version.
they make our code more structured and readable. It is knowns as anynonyms
function(function without name and not bound by an
identifier) they do not return any value. and can be declared without any function
keyword. they are also called lamda function.
The method is used for creating a new array from an existing one, applying a
function to each one of the elements
of the first array.
Ex:
*The filter method takes each element in a array and it applies a conditional
statement against it.
*IF THIS returns true the element gets pushed to the output array. It return false
doesn't pushed to the output array.
Reduce():
The reduces an array of value down to just one value. to get the output value it
runs a reducer function on each element of
the array.