It defined a array.prototype it accepts the first arguments.In this example call map of array execute value of the element,index of the array and map pass through the arguments.
Array functions are called one line functions.few difference between the map.it don’t state the for loop element’s are operate directly not for an index of the array.Do not create a new array,using the new variable to return value.
The filter method is also used to filter unwanted storage elements.filter to include a return statement it returns boolean values.A return statement is undefined returns an empty array.Reduce method can be reduce by array of single value. reduce returns a single value not an array containing a single item.
How useful was this post?
Click on a star to rate it!
Average rating / 5. Vote count:
No votes so far! Be the first to rate this post.
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!