const arr = [10, 5, 0, 15, 30]; const min = Math.min.apply(null, arr); const index = arr.indexOf(min); // get the index of the min in the array console.log(index); // 2