DEV Community

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

Collapse
 
muhammed_navas profile image
MUHAMMED NAVAS

it is making an error, arr.at is not a function.

Collapse
 
miketalbot profile image
Mike Talbot ⭐ • Edited

This is modern ES6 syntax, you will either need a modern browser/version of node or to use a transpiler like Babel.

This is the currently supported list:

caniuse.com/mdn-javascript_builtin...

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