js shift()

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2021 May 3 13:6
Editor
Edited
Edited
2025 Jan 29 15:39
Refs
Refs

pop을 앞쪽에서

const array1 = [1, 2, 3]; const firstElement = array1.shift(); console.log(array1); // expected output: Array [2, 3] console.log(firstElement);
 
 
 
 
 

Recommendations