Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript get second last element of array

const numbers = ["one", "two", "three", "four"];
console.log(numbers[numbers.length - 2]);
 
PREVIOUS NEXT
Tagged: #javascript #element #array
ADD COMMENT
Topic
Name
4+7 =