Adding [0] returns the first element of the array. For example: const arr = [1, 2, 3]; console.log(arr.slice(-1)); // [ 3 ] ...
確定! 回上一頁