DEV Community

Discussion on: How To Efficiently Get The Last Element Of An Array In JavaScript

Collapse
 
devlopr profile image
Aditya Mishra

Lol 😂😂 i forgot that array[-1] doesn't work, this answer of yours was what I meant but forgot to write the correct syntax