map method to iterate over an array in JavaScript
mapЗадание 1
Given an array of numbers. Using the
map method, extract the square
root of each array element and write
the result to a new array.
Задание 2
Given an array with strings. Using the
map method, add the character
'!' to the end of the value of
each array element.
Задание 3
Given an array with strings. Using the
map method, reverse the
characters of each string.
Задание 4
Given the following array:
javascriptlet arr = ['123', '456', '789'];
Using the map method, transform
this array into the following:
javascriptlet arr = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
];
Задание 5
Given an array of numbers. Using the
map method, write to each element
of the array the value of this element
multiplied by its index number in the array.