Lesson 4 - Remix Fund Me: Why use the for loop if the array will be set to a new object anyways? #6551
SeanFenech
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
At 4:35:30 on the withdraw function, he writes the following code:
`for (uint256 funderIndex = 0; funderIndex < funders.length; funderIndex++){
address funder = funders[funderIndex];
addressToAmountFunded[funder] = 0;
}
I was wondering if there is a particular reason to use the for loop when the variable will be reset in the next line, or if this was just for demonstration purposes.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions