title: How do we do sum of indexes in a 2D array
body: <p>I have a 2D array where rows = 3 and columns = 2. I want to get a sum of all the indices. Here is my array.</p>
  <blockquote>
  <p>arr[][] = [1, 2], [3, 4], [5, 6]</p>
  </blockquote>
  <ul>
  <li><p><strong>Row 1</strong></p>
  <p>At <code>index (0, 0)</code> the sum of indexes  becomes <code>(0 + 0 = 0)</code></p>
  <p>At <code>index (0, 1)</code> the sum of indexes becomes <code>(0 + 1 = 1)</code></p>
  </li>
  <li><p><strong>Row 2</strong></p>
  <p>At <code>index (1, 0)</code> the sum of indexes becomes <code>(1 + 0 = 1)</code></p>
  <p>At <code>index (1,1)</code> the sum of indexes becomes <code>(1 + 1 = 2)</code></p>
  </li>
  <li><p><strong>Row 3</strong></p>
  <p>At <code>index (2, 0)</code> the sum of indexes becomes <code>(2 + 0 = 2)</code></p>
  <p>At <code>index (2, 1)</code> the sum of indexes becomes <code>(2 + 1 = 3)</code></p>
  </li>
  </ul>
  <p>My expected output becomes</p>
  <pre><code>0 1 1 2 2 3
  </code></pre>
  <p>I am unable to find any resource, how to do this</p>