arr = ["Apollo", "Bacchus", "Ianus", "Iupiter", "Mars", "Mercurius"]; Array.prototype.sucher = function(w) { trace(this); var resD = []; var resC = []; for (i in this) { if ((this[i].indexOf(w, 0) != -1)) { resD.push(this[i]); resC.push(i); } } if (resD.length == 0) { return (-1); } else { resC.shift(); resC = resC.reverse(); return (resC); } }; trace(arr.sucher("us"));