Wha T Is Iteration

[Solved] Wha T Is Iteration | Solidity - Code Explorer | yomemimo.com
Question : wha t is iteration

Answered by : chidera-ugochukwu

Like, comment, follow and improve!!!
# In most programming languages, iteration
# can be seen as looping over all the items in a data type e.g:array that stores
# grouped data.
# eg(Python):
list = [1, 2, 3]
for i in list:	print(i)
# On the 1st iteration, i will be equal to 1
# On the 2nd iteration, i will be equal to 2
# On the 3rd iteration, i will be equal to 3
# So, for each running of the code the pointer moves to the next item
of the list.
# eg(Javascript):
let arr = [1, 2, 3, 4, 50]
for(i = 0; i < arr.length; i++){	console.log(arr[i])
}
// This prints all the values in the array.
// For each iteration, the pointer moves to the next item as i increases.
I am confident that you coders can understand from this piece.
I hope I helped you.
Thanks. 

Source : | Last Update : Sun, 18 Sep 22

Answers related to wha t is iteration

Code Explorer Popular Question For Solidity