-
Notifications
You must be signed in to change notification settings - Fork 206
done #160
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?
done #160
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.
Dario,
Całość wygląda bardzo dobrze 👍
Zostawiłem Ci dodatkowe działanie dla zadanie 05 :)
| const suma = numA + b; | ||
| const roznica = numA - b; | ||
| const iloczyn = numA * b; | ||
| const iloraz = numA / b; | ||
| const modulo = numA % b; | ||
| const potega = numA ** b; |
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.
Nazwy zmiennych zdecydowanie lepiej jest pisać w j. angielskim
| } | ||
| } else { | ||
| alert('Podałeś dane poza zakresem!'); | ||
| } |
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.
👍
| a = Math.floor(Number(a)); | ||
| b = Math.floor(Number(b)); | ||
| c = Math.floor(Number(c)); |
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.
Można też utworzyć tablicę, posortować i mamy 2 największe liczby troszkę prościej :)
| if (arr.length === 0) return 0; | ||
| const sum = arr.reduce((acc, num) => acc + num, 0); | ||
| return sum / arr.length; | ||
| } |
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.
👍
05/index.js
Outdated
| const sum = grades.reduce(function (acc, curr) { | ||
| return acc + curr; | ||
| }, 0); | ||
| return sum / grades.length; |
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ęść jest bardzo podobna do części z linii 39-43 - w takim wypadku warto zrobić metodę (funkcje) i w obu miejscach wykorzystać, spróbujesz?
No description provided.