How to get value at a specific index of array In JavaScript?

Just use indexer

var valueAtIndex1 = myValues[1];

Update from Chrome 92 (released on: July 2021)

You can use at method from Array.prototype as follows:

var valueAtIndex1 = myValues.at(1);

See more details at MDN documentation.

Leave a Comment