Skip to content

Conversation

@Amanitus
Copy link

No description provided.

Copy link
Owner

@devmentor-pl devmentor-pl left a 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! 👍

Comment on lines +12 to +15
const difference = Number(a) - b;
const multiplication = Number(a) * b;
const division = Number(a) / b;
const modulo = Number(a) % b;
Copy link
Owner

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);
Copy link
Owner

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);
Copy link
Owner

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;
Copy link
Owner

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

Comment on lines +9 to +10
}
this.grades[subject].push(grade);
Copy link
Owner

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;
Copy link
Owner

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants