Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
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 を返し、その内容はこの ArrayBuffer の start から end の手前までをコピーします。start または end のいずれかが負の場合、配列の先頭からではなく、末尾からのインデックスを指します。
抽出を始める位置のゼロから始まるインデックスで、整数に変換されます。
抽出し終える位置のゼロから始まるインデックスで、整数に変換されます。 slice() は end を含まず、その直前までを抽出します。
抽出した要素が入った新しい ArrayBuffer です。元がリサイズ可能であってもリサイズ可能ではありません。
| ECMAScript® 2027 Language Specification # sec-arraybuffer.prototype.slice |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年11月29日 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.