How to remove the first element from an array in JavaScript

1 Answer

0 votes
let arr = ["javascript", "php", "c", "c++"];

arr.shift();

console.log(arr);

    
    
    
/*
run:
    
["php", "c", "c++"]
    
*/

 



answered Feb 2, 2021 by avibootz
...