-
Notifications
You must be signed in to change notification settings - Fork 206
Zadania #153
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?
Zadania #153
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.
Piotrze,
Zostawiłem Ci parę drobnych uwag - poza tym ok! 👍
| const difference = Number(a) - b; | ||
| const multiplication = Number(a) * b; | ||
| const division = Number(a) / b; | ||
| const modulo = Number(a) % 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.
Warto też sprawdzić czy konwersja jest tutaj niezbędna.
| } | ||
| } | ||
| console.log(str); | ||
| console.log(str+'='+result); |
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.
👍
| } | ||
| const itResult = isEven(result); | ||
|
|
||
| showInfo(result, itResult); |
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.
👍
| const sum = arr.reduce(function (accumulator, currentValue) { | ||
| return accumulator + currentValue; | ||
| }, 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.
Warto sprawdzać czy tablica posiada jakieś elementy, bo wtedy dzielimy przez 0 :P
| } | ||
| this.grades[subject].push(grade); |
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.
Uwaga na odstępy od lewej krawędzi
| return acc + grade; | ||
| }, 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.
Podobnie jak w poprzednim zadaniu - nie dzielimy przez 0 :P
| const avg = student.getAverageGrade(); | ||
|
|
||
| console.log(avgMath); | ||
| console.log(avg); 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.
👍
No description provided.