title: Array of Arrays in Ruby
body: <p>Objective: Given an array of strings, output an array whose each element is an array containing the original element and its index.</p>
  <p>For Example:
  input = ['red', 'violet', 'blue']</p>
  <pre><code>Use the input array to construct the following array:
  
  [['red', 0], ['violet', 1], ['blue', 2]]
  </code></pre>
  <p>The Signature method_name is as given:
  make_array(input_array)</p>
  <p>The method should return nil in the following scenarios:</p>
  <ol>
  <li>if input_array is Hash/string/Fixnum [i.e anything that is not an array]</li>
  <li>if input_array is nil/empty</li>
  <li>if any element of input_array is not a string [i.e input_array has to be an array of strings]</li>
  </ol>
  <p>For case 1,2 and 3, try to use exception handling where in the rescue block you should return nil.</p>
  <p>note:: The return value must be an Array of Arrays or nil</p>
  <p>In this, how to convert array to array of arrays and how to raise these exceptions?
  Since I am new to Ruby ,I find it difficult to solve.Please help me out with this.
  Thanks!</p>