Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2016년 9월.
TypedArray.from() 정적 메서드는 순회 가능한 객체 혹은 유사 배열로부터 새로운 형식화 배열을 생성합니다. 이 메서드는 Array.from()와 거의 같습니다.
TypedArray는 아래 중 하나입니다.
형식화 배열로 변환할 순회 가능한 객체 혹은 유사 객체.
mapFn Optional입력된 배열의 모든 요소에 대해 호출할 함수입니다. 이 함수를 제공하면 배열에 추가할 모든 값이 먼저 이 함수를 통과하고 mapFn의 반환 값이 형식화 배열에 입력 값 대신 추가됩니다. 이 함수는 다음 인수를 사용하여 호출됩니다.
element형식화 배열에서 처리 중인 현재 요소입니다.
index형식화 배열에서 처리 중인 현재 요소의 인덱스입니다.
thisArg OptionalmapFn을 실행할 때 this로 사용할 값입니다.
새로운 TypedArray 인스턴스입니다.
자세한 내용은 Array.from()을 참고하시기 바랍니다.
Array.from()와 TypedArray.from() 사이에는 미묘한 차이가 있습니다(참고: 아래에 언급된 this 값은 mapFn을 호출하는 데 사용된 thisArg 인수가 아니라 TypedArray.from()가 호출된 this 값입니다).
요소를 조작하는 Map 함수로서 화살표 함수 사용하기
from()의 this 값은 TypedArray 인스턴스를 반환하는 생성자여야 합니다.
| ECMAScript® 2027 Language Specification # sec-%typedarray%.from |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025년 2월 11일 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.