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 2015년 7월.
slice() 메서드는 현재 ArrayBuffer를 주어진 시작과 끝점에 맞춰 자른 새로운 ArrayBuffer를 반환합니다.
자르기 시작할 지점을 나타내는 0 기반 인덱스.
end Optional자르기 끝낼 지점을 나타내는 바이트 인덱스. 지정하지 않은 경우 새로운 ArrayBuffer는 지정한 시작점부터 현재 ArrayBuffer의 끝까지 가지게 됩니다.
새로운 ArrayBuffer 객체.
slice() 메서드는 end 매개변수로 지정한 바이트 위치 바로 앞까지 현재 배열 버퍼를 복사합니다. begin과 end는 음의 값인 경우 배열의 시작부터 위치를 세지 않고 끝에서부터 셉니다.
end 값이 유효한 범위를 벗어날 경우 버퍼 길이에 맞춰 잘라냅니다. 또한 새로운 ArrayBuffer의 길이가 음의 값이 나올 경우 0으로 처리합니다.
| ECMAScript® 2027 Language Specification # sec-arraybuffer.prototype.slice |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025년 6월 24일 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.