| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map | [Back] [Original] |
Get to know MDN better
const uint8 = new Uint8Array([25, 36, 49]);
const roots = uint8.map(Math.sqrt);
console.log(roots);
// : Uint8Array [5, 6, 7]
map(callbackFn)
map(callbackFn, thisArg)
const numbers = new Uint8Array([1, 4, 9]);
const roots = numbers.map(Math.sqrt);
// roots [1, 2, 3]
// numbers [1, 4, 9]
1 map() map()
const numbers = new Uint8Array([1, 4, 9]);
const doubles = numbers.map((num) => num * 2);
// doubles Uint8Array [2, 8, 18]
// numbers Uint8Array [1, 4, 9]
| ECMAScript 2027 LanguageSpecification # sec-%typedarray%.prototype.map |
| Web Proxy Viewer | New URL | Original Page |