Answers for "know last element of array"

1

javascript get last element of array

var last = arr.slice(-1)[0]
Posted by: Guest on January-10-2022
1

javascript get last element of array

const lastItem = colors[colors.length - 1]
Posted by: Guest on June-19-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language