title: Invert an array of booleans in JavaScript
body: <p>I am trying to invert the values of a string of boolean values so that instead  of </p>
  
  <p><code>inverted([true, false, true, false, true])</code> </p>
  
  <p>it is  <code>[false, true, false, true, false]</code> </p>
  
  <p>So far I have come up with this: </p>
  
  <pre><code>function inverted(bools) {
      var inversion = [];
      var string= [];
      while(!bools) {
        string.push(bools);
      }
      return inversion;
  }
  </code></pre>
  
  <p>But my code is not working, any and all help will be much appreciated! </p>