Array.prototype.mapbeginnerconst nums = [1, 2, 3]
nums.map(String) // β ['1', '2', '3']Pass String directly as the map() callback to convert every number to its string equivalent.
map can be used to convert every element to a different type. Passing a built-in function such as String directly as the callback is a concise pattern.
Challenge: Implement toStrings(nums) that converts each number to its string representation.
toStrings([1, 2, 3]) // β ['1', '2', '3']
toStrings([0, -5, 100]) // β ['0', '-5', '100']