title: I must create a function, that returns the last element of an array that is passed in
body: <p>I am lost on how to use an array in a function. Here is what I have but it is not a function so it is incorrect?</p>
  
  <pre><code>var theLastOne = [1,2,3,4,5,'purple'];
  var last_element = theLastOne[theLastOne.length - 1];
      console.log(last_element)
  </code></pre>
  
  <p>Here is the exact question. Create a function called theLastOne that returns the last element of an array that is passed in. Hint: This should work for an array of any size.</p>