title: How to square an array of numbers in ruby with while without `each` `map` or `collect` methods?
body: <p>I'm new to coding in RUBY. I'm trying to write a method that squares each element in an array of numbers and returns a new array of these numbers squared. Trying to use while loop and NOT use <code>each</code>, <code>collect</code>, or <code>map</code>. Having trouble understanding how to index/loop each individual element of array and square is (**). </p>
  
  <p>This is what makes sense to me but I know its wrong. </p>
  
  <pre><code>def square_array(numbers)
    count = 0
    while count &lt; numbers.length do
      numbers.index ** 2 
    end
    square_array(numbers)
  end 
  </code></pre>
  
  <p>Will anyone please help me? Thanks!</p>