Answers for "remove the first string of an array and return it"

0

remove the first item from an array

var arr = [1, 2, 3, 4]; 
var theRemovedElement = arr.shift(); // theRemovedElement == 1
console.log(arr); // [2, 3, 4]
Posted by: Guest on November-04-2021
0

js remove first element from string

let str = " hello"
str = str.substring(1)
Posted by: Guest on December-11-2020

Code answers related to "remove the first string of an array and return it"

Code answers related to "Javascript"

Browse Popular Code Answers by Language