Зміст курсу
Introduction to Scala
Introduction to Scala
Challenge: Fill an Array
Task
Your task is to create an array of integers of size 20
named testArray
and fill it with numbers from 1 to 20 inclusive using a for loop with the loop variable named i
to iterate over its indices in a concise way.
Main
object Main { def main(args: Array[String]): Unit = { var ___ = new ___[___](___) // Declare an array variable for (___ ___ testArray.___) { ___(___) = ___ // Fill the array } } }
Дякуємо за ваш відгук!