I am having problems understanding the concept of Array.map. I did go to Mozilla and Tutorials Point, but they provided very limited info regarding this.
Map function goes through each element of an array in ascending order and invokes function f on all of them.
It returns new array which is being computed after function is invoked on it.
Ref: http://www.thesstech.com/javascript/array_map_method
Syntax
array.map(f)
Example:
Answer: 8,10,12
Ref: http://www.thesstech.com/tryme?filename=javascript_array_map_method