| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted | [Back] [Original] |
Get to know MDN better
toSorted()
toSorted(compareFn)
const numbers = new Uint8Array([40, 1, 5, 200]);
const numberSorted = numbers.toSorted();
console.log(numberSorted); // Uint8Array [ 1, 5, 40, 200 ]
//
//
console.log(numbers); // Uint8Array [ 40, 1, 5, 200 ]
| ECMAScript 2027 LanguageSpecification # sec-%typedarray%.prototype.tosorted |
| Web Proxy Viewer | New URL | Original Page |