이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 참여해서 번역을 마치도록 도와 주세요!
English (US)의 문서도 읽어보세요.

Obsolete since Gecko 34 (Firefox 34 / Thunderbird 34 / SeaMonkey 2.31)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

The move() method used to copy the sequence of array elements within the array to the position starting at target. However, this non-standard method has been replaced with the standard TypedArray.prototype.copyWithin() method. TypedArray is one of the typed array types here.

Syntax

typedarray.move(start, end, target)

Parameters

start
Source start index position where to start copying elements from.
end
Source end index position where to end copying elements from.
target
Target start index position where to copy the elements to.

Return value

The modified type array.

Examples

Using the move method

var buffer = new ArrayBuffer(8);
var uint8 = new Uint8Array(buffer);
uint8.set([1,2,3]);
console.log(uint8); // Uint8Array [ 1, 2, 3, 0, 0, 0, 0, 0 ]
uint8.move(0,3,3);
console.log(uint8); // Uint8Array [ 1, 2, 3, 1, 2, 3, 0, 0 ]

Specifications

Not part of any standard. Superseded by TypedArray.prototype.copyWithin().

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No No16 — 341 No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No No No38 — 341 No No No

1. Was available in Aurora and Nightly channels only.

See also

문서 태그 및 공헌자

이 페이지의 공헌자: fscholz, eduardoboucas
최종 변경자: fscholz,