This page was translated from English by the community.Learn more and join the MDN Web Docs community.
TypedArray.prototype.reverse()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2016년 9월.
reverse() 메서드는 제자리에서 형식화 배열을 뒤집습니다. 형식화 배열 첫 요소는 마지막이 되고 마지막은 첫 요소가 됩니다. 이 메서드는Array.prototype.reverse()와 같은 알고리즘입니다.TypedArray는 여기TypedArray 객체 유형 중 하나입니다.
In this article
시도해 보기
const uint8 = new Uint8Array([1, 2, 3]);uint8.reverse();console.log(uint8);// Expected output: Uint8Array [3, 2, 1]구문
js
typedarray.reverse();반환 값
뒤집힌 배열.
예제
js
var uint8 = new Uint8Array([1, 2, 3]);uint8.reverse();console.log(uint8); // Uint8Array [3, 2, 1]명세
| Specification |
|---|
| ECMAScript® 2026 Language Specification> # sec-%typedarray%.prototype.reverse> |