We have an array of numbers like this:
const array = [2, 1, 3, 1];
the minimum number in the array is 1
right? Now I want to return a new array containing the index or indices of the minimum numbers in the given array. So in above array the desired result would be:
[1, 3] // indices of minimum number which is 1
If there is only one element in the array we should return 0
right...