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