-
Notifications
You must be signed in to change notification settings - Fork 206
commit of practice-js-basics #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
devmentor-pl
left a comment
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.
Dagmaro,
Tutaj wszystko ok, z jedną drobną uwagą 👍
| let modulo = b % aNumber; | ||
| console.log(modulo) | ||
|
|
||
| //inkrementacji sie nie da bo b jest const |
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.
👍
| } | ||
| } | ||
|
|
||
| /* rozwiązanie z pętlą while */ |
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.
Tutaj zabrakło mi rozwiązania ;)
| const sum = getSum(a, b, c); | ||
| const even = isEven(sum); | ||
|
|
||
| showInfo(sum, even); |
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.
👍
| console.log('10 największych liczb:', largestNumbers); | ||
|
|
||
| const average = getAvg(largestNumbers); | ||
| console.log('Średnia arytmetyczna 10 największych liczb:', average); No newline at end of file |
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.
👍
| if (!grades || grades.length === 0) { | ||
| return 0; | ||
| } | ||
| const sum = grades.reduce((acc, grade) => acc + grade, 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.
Ta część powtarza się z tą z linii 28 - można napisać funkcję, która będzie wywoływana w obu przypadkach.
prosze o cr :)