Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript array negative index

const arr = ["first", "second", "third"]
console.log(arr[-1]) // Will return undefined
 
PREVIOUS NEXT
Tagged: #javascript #array #negative #index
ADD COMMENT
Topic
Name
6+9 =