code: function(arr) {
      var key = 0;
      var min = arr[0];
      for(var i = 1, len = arr.length; i < len; i++) {
        if(arr[i] < min) {
          key = i;
          min = arr[i];
        }
      }
      return key;
    }
docs: Get index of the minimal value within an array of numbers.