Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Fill an Array | Arrays
Introduction to Scala
course content

Cursusinhoud

Introduction to Scala

Introduction to Scala

1. Getting Started
2. Variables and Data Types
3. Conditional Statements and Loops
4. Arrays
5. Strings

book
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.

java

Main

copy
12345678
object Main { def main(args: Array[String]): Unit = { var ___ = new ___[___](___) // Declare an array variable for (___ ___ testArray.___) { ___(___) = ___ // Fill the array } } }

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 4. Hoofdstuk 3

Vraag AI

expand
ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

course content

Cursusinhoud

Introduction to Scala

Introduction to Scala

1. Getting Started
2. Variables and Data Types
3. Conditional Statements and Loops
4. Arrays
5. Strings

book
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.

java

Main

copy
12345678
object Main { def main(args: Array[String]): Unit = { var ___ = new ___[___](___) // Declare an array variable for (___ ___ testArray.___) { ___(___) = ___ // Fill the array } } }

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 4. Hoofdstuk 3
Onze excuses dat er iets mis is gegaan. Wat is er gebeurd?
some-alt