We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c93d1eb commit 20c8b4dCopy full SHA for 20c8b4d
1 file changed
RandSum0/index.js
@@ -1,7 +1,11 @@
1
class genSum {
2
constructor(n) {
3
this.array = []
4
- if (n > 0) this.toss(n)
+ if (n > 0) {
5
+ if (n === 1) this.array.push(0)
6
+
7
+ this.toss(n)
8
+ }
9
}
10
toss(n) {
11
if (n) {
0 commit comments