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 )
}
2
Q
What is a more advanced way to loop through an Array?
A
for (index, value) in arr.enumerate(){
arr[index] = value + 1
}