Skip to content

LESSON 4: Fund Me. Getting an error when trying to reset an array. #5811

Answered by roychaadit
NIAZELOPER asked this question in Q&A
Discussion options

You must be logged in to vote

To reset, you must do

Funders = new address[](0);

Also I think your loop should be

for (uint256 FundersIndex = 0; FundersIndex < Funders.length; FundersIndex+=1)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@NIAZELOPER
Comment options

Comment options

You must be logged in to vote
1 reply
@NIAZELOPER
Comment options

Answer selected by NIAZELOPER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants