title: How do I remove the objects I want from an array and add them to another array using .forEach?
body: <p>This is a coding challenge I'm working on and can't seem to grasp what I need to do. Not sure if I am even going in the right direction.</p>
  
  <p>Here is the instructions: Here we have an array called people. Some of them are our friends and some are not.
  1. Create an empty array called friends.
  2. Using .forEach, loop over people and add those that are our friend to the empty friends array.</p>
  
  <p>Here is the provided code:</p>
  
  <pre><code>var people = [
    {name: "Landy",friend: true},
    {name: "Corey",friend: true},
    {name: "Ted",friend: false},
    {name: "Sperry",friend: true},
    {name: "Bill",friend: false}
  ];
  </code></pre>
  
  <p>My code so far: </p>
  
  <pre><code>var friends = [];
  people.forEach(function(people){
    if (people === true) {
      return name;
    } else {
      // 
    }
  });
  </code></pre>