Javascript Array lastIndexOf(e)
Array.prototype.lastIndexOf = function (e) { for (var i = this.length - 1, j; j = this[i]; i--) { if (j == e) { return i; } }//w w w. j a va 2s .co m return -1; }