title: Make all elements in an array lowercase and remove whitespace - using jQuery
body: <p>I have an array of postcodes that I have created by reading a text file. I would lik eto step through each item in the array and make it lowercase, and remove any whitespace. So far I have the following:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var postCodesCovered = new Array();
  $.get('postcodes.txt', function(data){
    postCodesCovered = data.split('\n');
  });
  $.each(postCodesCovered , function(){
    $(this).toLowerCase().replace(/\s+/g, '');
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>This doesn't seem to do the trick though. Is it because I am not setting the values back to the array?</p>