Skip to content

Jasyn Marais - JavaScript IV - #2

Open
jasynmarais wants to merge 9 commits into
masterfrom
jasyn-marais-2
Open

jasynmarais wants to merge 9 commits into
masterfrom
jasyn-marais-2

Conversation

@jasynmarais

Copy link
Copy Markdown
Owner

No description provided.

@jasynmarais
jasynmarais requested a review from nedssoft October 17, 2019 14:49

@nedssoft nedssoft left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good job on the project. There's a merge conflict on the PR, fix and merge

return `${student.name} receives a perfect score on ${subject}`;
}
randGrade(student) { // stretch
student.grade = Number(student.grade);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No need mutating the object, you could create a new variable off of the student object, e.g let studentGrade = Number(student.grade)

}
listSubjects() {
console.log(`${this.name} favourite subjects: ${this.favSubjects}`);
return `${this.name} favourite subjects: ${this.favSubjects}`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

favSubjects is an array, to make it a list separated by a comma, you could use, this.favSubjects.join(',')

Comment on lines +47 to +53
drive(distance) {
if (this.canDrive) {
this.odometer += Number(distance);
return `Drove ${distance} miles. Odometer: ${this.odometer}.`;
}
return `I crashed at ${this.odometer} miles!`;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This does not conform with the instruction/spec

@nedssoft
nedssoft self-requested a review October 18, 2019 07:55
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