SyntaxFix
Write A Post
Hire A Developer
Questions
Use the slice() method:
slice()
my_array.slice(-1)[0]