Conditionals Flashcards

1
Q

What is a simple way to loop through an array with a for-loop?

A

for x in array {

print( x )

}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a more advanced way to loop through an Array?

A

for (index, value) in arr.enumerate(){

arr[index] = value + 1

}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly