Skip to content

Conversation

@satoshi300
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.

Michale,

Zadania są ok 👍
Zostawiłem Ci parę uwag, na spotkaniu wszystko dokładnie umówimy :)

}

console.log();
console.log();
Copy link
Owner

Choose a reason for hiding this comment

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

👍

02/app.js Outdated

while (j <= n) {
if (a <= 9 && a > 0 && n <= 9 && n > 0) {
result2 = Math.pow(a, n);
Copy link
Owner

Choose a reason for hiding this comment

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

Trochę inaczej miało się to wyświetlać w konsoli :)

}
}

showInfo(sum, even);
Copy link
Owner

Choose a reason for hiding this comment

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

👍

sum += num;

});
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 się zabezpieczyć czy nie dzielimy przez 0 :)

05/app.js Outdated
for (let i = 0; i < grades.length; i++) {
sum += grades[i];
}
console.log(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.

Tutaj powinno być return, bo funkcja powinna zwrócić wynik (zaczyna się od get)

05/app.js Outdated
}
if (totalCount === 0) return null;

console.log((totalSum / totalCount).toFixed(2));
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 wcześniej

Comment on lines 41 to 44
for (let subjectName in this.grades) {
const subjectGrades = this.grades[subjectName];

for (let i = 0; i < subjectGrades.length; i++) {
Copy link
Owner

Choose a reason for hiding this comment

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

To jest to oczym pisałem na Slacku. Pobieramy konkretny przedmiot oraz oceny dla niego. Sumujemy i pobieramy oceny dla kolejnego - w ten sposób mamy dostęp do wszystkich ocen (a w zasadzie ich sumy) i możęmy obliczyć średnią.

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