var relax = ["noc", "ruka", "noga", "golova", "stypny"]; var indx = relax.indexOf("noga"); if (indx > 0) relax[--indx] = "другая строка"; alert(relax);