DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
javascript loop last index
for (const [i, value] of arr.entries()) { if (i === arr.length - 1) { // do your thing } }
PREVIOUS
NEXT
Tagged:
#javascript
#loop
#index
ADD COMMENT
Topic
COMMENT
Name
1+2 =
Submit