array maximum index 1 javascript code example Example: javascript index of biggest number arr.indexOf(Math.max(...arr))