-
-
Notifications
You must be signed in to change notification settings - Fork 121
Tasks done #20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Tasks done #20
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add {}
everywhere
// For example sum(1, 2, 3) should return 6 | ||
let acc = 0; | ||
for (let i = 0; i < args.length; ++i) | ||
acc += args[i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acc += args[i]; | |
acc += args[i]; | |
} |
// to calculate sum of all given arguments | ||
// For example sum(1, 2, 3) should return 6 | ||
let acc = 0; | ||
for (let i = 0; i < args.length; ++i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (let i = 0; i < args.length; ++i) | |
for (let i = 0; i < args.length; ++i) { |
// to calculate sum of all given arguments | ||
// For example sum(1, 2, 3) should return 6 | ||
let acc = 0; | ||
for (const num of args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (const num of args) | |
for (const num of args) { |
let acc = 0; | ||
for (const num of args) | ||
acc += num; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}
// to calculate sum of all given arguments | ||
// For example sum(1, 2, 3) should return 6 | ||
let accum = 0; | ||
while (args.length !== 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while (args.length !== 0) | |
while (args.length !== 0) { |
let accum = 0; | ||
while (args.length !== 0) | ||
accum += args.pop(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}
|
||
for (let row = 0; row < matrix.length; ++row) | ||
for (let column = 0; column < matrix[row].length; ++column) | ||
maxVal = (matrix[row][column] > maxVal) ? matrix[row][column] : maxVal; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use code blocks {}
No description provided.