title: Can help make array with only odd numbers from array in Kotlin
body: <p>I need help. I trying make array only with odd numbers but I don't want use arraylist because I only want array.</p>
  
  <p>Input array like this: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]</p>
  
  <p>I am trying to get odd only array like : [1, 3, 5, 7, 9]</p>
  
  <pre><code>val array = arrayOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
  val arraylist = arrayListOf&lt;Int&gt;() 
  for(i in 0..array.size - 1) {
      if(array[i] % 2 != 0) 
          arraylist.add(array[i])
  }
  val oddarray = arraylist.toArray()
  </code></pre>