Skip to content

Lesson 7: "fundMeConnectedContract" is declared const #1212

Answered by Rishi860
ManuWeb3 asked this question in Q&A
Discussion options

You must be logged in to vote

The variable fundMeConnectedContract is scoped inside the for loop, so re-running the loop re-declares it.
If you declare it outside the loop as const and then change values it should show an error of assigning to a constant variable.

Replies: 1 comment 1 reply

Comment options

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

Answer selected by ManuWeb3
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