title: Changing array value when condition is met in javascript
body: <p>Let's say I have an array <code>var arr = [3,4,5,6,7,9];</code> and I log the contents like this:</p>
  
  <pre><code>$.each(arr, function(k, v) {
    console.log(v);
  }
  </code></pre>
  
  <p>As I log the contents I want to check if the current value is bigger than for example <code>var limit = 5;</code>.</p>
  
  <p>If the current value is bigger than <code>limit</code> I want to replace/change that value to let's say the letter <code>A</code> and print it out as such. So my logged <code>arr</code> array would look like this <code>3,4,5,A,A,A</code>.</p>
  
  <p>I was thinking about something like this:</p>
  
  <pre><code>$.each(arr, function(k,v) {
    if (v &gt; limit) {
      // set this specific value equal to limit
      // log changed value
    }
    console.log(v); // otherwise just log the value found
  });
  </code></pre>
  
  <p>I tried this, but it does nothing, no errors either.</p>