title: How to convert string array to int array in scala
body: <p>I am very new to Scala, and I am not sure how this is done. I have googled it with no luck.
  let us assume the code is:</p>
  
  <pre><code>var arr = readLine().split(" ")
  </code></pre>
  
  <p>Now arr is a string array. Assuming I know that the line I input is a series of numbers e.g.  1 2 3 4, I want to convert arr to an Int (or int) array.</p>
  
  <p>I know that I can convert individual elements with .toInt, but I want to convert the whole array.</p>
  
  <p>Thank you and apologies if the question is dumb.</p>