var arr = [ 1, 2, 3, 4, 5 ];. var first = [...arr].shift(); // costly for large arrays. console.log(first);. /*. Output: 1.
確定! 回上一頁