Changing the value of an item in a for-of loop
<p>I'm learning some of the new tricks in ES6, and I quite like the for-of loop for arrays. One thing I'm having some trouble with is if I want to manipulate the current item's value inside the loop. </p>

<p>For example in ES5:</p>

<pre><code>var myArr = [1,2,3];
for(var i = 0; i &lt; myArr; i++){
    myArr[i] = "moo"
}
</code></pre>

<p>When using the for-of loop in ES6 if I change the value of the current item inside the loop it's not reflected in the array. Is there a way to do this?</p>