DEV Community

Discussion on: Tips: How to get last element of an array in javascipt

Collapse
 
codemeop profile image
codemeop

i always use arr.length-1

Some comments have been hidden by the post's author - find out more