title: Iterating through an array containing objects using a function and a parameter
body: <p>I'd like to create a function that iterates through an array containing separate objects with name, surname and age properties. The function should take a parameter "name" and return the name, surname and age in the console.</p>
  
  <p>How would I do this? I've looked at some other questions but can't seem to figure out how to do it. I've created this so far...</p>
  
  <pre><code>var people = [
    { name: "Sue", surname: "Beckett", age: 50},
    { name: "Bill", surname: "Borough", age: 44},
    { name: "Janet", surname: "Jupp", age: 23},
    { name: "Peter", surname: "Pepper", age: 21},
    { name: "Samantha", surname: "Salad", age: 17}
  ];
  
  
  function person(name) {
    // code here
  }
  
  person(sue)
  </code></pre>