code: function arrayIndexOf (array, val) {
  
          // Use native indexOf
          if (Array.prototype.indexOf) {
              return array.indexOf(val);
          }
  
          // Use loop/if for environments without native indexOf
          var i, len = array.length;
          for (i = 0; i < len; len += 1) {
              if (array[i] === val) {
                  return i;
              }
          }
          return -1;
  
      }
docs: Utilities Get the index of the first instance of a value in an array