Lesson 3: Fund Me #1808
Answered
by
Nlferu
propeltrain
asked this question in
Q&A
Lesson 3: Fund Me
#1808
-
What is the meaning and use of += between [msg.sender] and msg.value? Timestamp: 2.29.46 minutes. |
Beta Was this translation helpful? Give feedback.
Answered by
Nlferu
Dec 12, 2022
Replies: 1 comment 2 replies
-
Hello @propeltrain y += x is equal to y = y + x so in your case it will be: addressToAmountFunded[msg.sender] += msg.value
//will be equal to
addressToAmountFunded[msg.sender] = addressToAmountFunded[msg.sender] + msg.value Let me know if it is clear enough for you :) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
cromewar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @propeltrain
y += x is equal to y = y + x
so in your case it will be:
Let me know if it is clear enough for you :)