Array.prototype.mapintermediateconst strs = ['1', '2', '3']
strs.map(Number) // β [1, 2, 3]Pass Number as the map() callback to parse every string element to a number.
Just as String can be passed directly to map, so can Number. This converts an array of numeric strings into an array of actual numbers in one step.
Challenge: Implement parseNumbers(strs) that converts each string element to a number.
parseNumbers(['1', '2', '3']) // β [1, 2, 3]
parseNumbers(['10', '-5', '0']) // β [10, -5, 0]