Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

TypedArray.prototype.sort()

sort() 메서드는 적소에 형식화 배열의 요소를 정렬하여 그 형식화 배열을 반환합니다. 이 메서드는 Array.prototype.sort()와 같은 알고리즘입니다. TypedArray는 여기 형식화 배열 유형 중 하나입니다.

구문

typedarray.sort([compareFunction])

매개변수

compareFunction Optional
정렬 순서를 정의하는 함수를 지정합니다.

더 많은 예는, Array.prototype.sort() 메서드도 참조하세요.

var number = new Uint8Array([40, 1, 5, 200]);

function compareNumbers(a, b) {
  return a - b;
}

numbers.sort(compareNumbers);
// Uint8Array [ 1, 5, 40, 200 ]

스펙

스펙 상태 설명
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'TypedArray.prototype.sort' in that specification.
Standard 초기 정의.
ECMAScript 2017 Draft (ECMA-262)
The definition of 'TypedArray.prototype.sort' in that specification.
Draft  

브라우저 호환성

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 46 (46) ? (Yes) ?
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? 46.0 (46) ? ? ?

참조

문서 태그 및 공헌자

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