DEV Community

Discussion on: `at` coming soon to ECMAScript

Collapse
 
dsm637 profile image
Denis Mitropolsky

Another point - since everything in JS is an object, everything can be indexed using square brackets, not only array objects. So "at()" provides a safe way to get an element by index from the array and prevent an error when you're accidently working with someone which is not an array.