Created
October 22, 2019 21:42
-
-
Save Zambrella/b3367e46172c430d069821f531e2050d to your computer and use it in GitHub Desktop.
For Jesal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
Sample newSample = Sample(); | |
print(newSample.counts); | |
void setToZero () { | |
// for (var i = 0; i < newSample.counts.length; i++) { | |
// newSample.counts[i] = 0; | |
// } | |
newSample.counts.forEach((i) => newSample.counts[i-1] = 0); | |
print(newSample.counts); | |
}; | |
setToZero(); | |
} | |
class Sample { | |
List counts = [1, 2, 3]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment