title: Convert Array<Int> to Int kotlin 2D Array
body: <p>Is there a way to convert an <code>Array&lt;Int&gt;</code> to an Int in Kotlin? I am messing with 2D arrays and am trying to print the elements whose indexes are equal to each other. Here is my loop that tries to accomplish this:</p>
  
  <pre><code>     for (rows in arr) {
           for (elements in rows) {
  --------&gt;    if (rows == elements) {
                   print(elements)
               }
           }
           print("\n")
       }
  </code></pre>
  
  <p><code>rows</code> is type <code>Array&lt;Int&gt;</code> and <code>elements</code> is type <code>Int</code>. I have already tried using the StringBuilder method and that does not work. Is there a function or other method that allows this? Any tips for me to do further research is appreciated.</p>