Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript how to get every element after the 1st in an array

var arguments = ['One', 'Two', 'Three'];
var middle = arguments.slice(1, -1); // will take away the 1st from the start and the 1st from the end
console.log(middle); // once logged it will only show 'Two'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #element #array
ADD COMMENT
Topic
Name
9+8 =