“mdn .Map” Kod odpowiedzi

tablica mapa MDN

let new_array = arr.map(function callback( currentValue[, index[, array]]) {
    // return element for new_array
}[, thisArg])
Bad Bison

mdn .Map

const numbers = [1, 5, 10, 15];
const doubles = numbers.map(function(x) {
   return x * 2;
});
// doubles is now [2, 10, 20, 30]
// numbers is still [1, 5, 10, 15]
Dizzy Dog

Odpowiedzi podobne do “mdn .Map”

Pytania podobne do “mdn .Map”

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu