javascript get index of min value in array code example
Example 1: javascript index of min value in array
arr = [11, 10, 10];
var index = arr.indexOf(Math.max(...arr));
Example 2: javascript index of biggest number
arr.indexOf(Math.max(...arr))
arr = [11, 10, 10];
var index = arr.indexOf(Math.max(...arr));
arr.indexOf(Math.max(...arr))