⊗jsPmIMMp 280 of 504 menu

map method to iterate over an array in JavaScript

map

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.

Given an array with strings. Using the map method, add the character '!' to the end of the value of each array element.

Given an array with strings. Using the map method, reverse the characters of each string.

Given the following array:

let arr = ['123', '456', '789'];

Using the map method, transform this array into the following:

let arr = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ];

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.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline