title: Method with if statement with syntax error
body: <p>I'm doing some Ruby excercises. My goal is to create a method which reproduces the first and last number of an array.</p>
  
  <p>My way of thinking was:</p>
  
  <pre><code>#create array
  a = [1,2,3,4]
  #create method
  def lastFirst
     return a[0,3]
  end
  #call the method with an array
  lastFirst(a)
  </code></pre>
  
  <p>But this produces <code>[1,2,3]</code> instead of what I want, which is <code>(1,3)</code>.</p>
  
  <p>Any thoughts on what I'm doing wrong?</p>