Array method
Sort
const arr = [2, 5, 3];
arr.sort((a, b) => a - b);
// [2, 3, 5]const sorted = [...arr].sort();
// 或是
const sorted = arr.slice(0).sort();Map
Reduce
Filter
Some
Find
Last updated
const arr = [2, 5, 3];
arr.sort((a, b) => a - b);
// [2, 3, 5]const sorted = [...arr].sort();
// 或是
const sorted = arr.slice(0).sort();Last updated