Replace string in array : <p>I want to replace a string within an array with another string.<br>
In my example <code>cat</code> should be replaced with <code>mouse</code>:</p>

<pre><code>var arr1 = [ "dog", "cat"];

for(i=0; i&lt;arr1.length; i++){
    arr1[i].replace("cat", "mouse");
}
</code></pre>

<p>Unfortunately, the array remains unchanged.</p>

<p>Where is the error?</p>
