Skip to content

Homework 01 #16

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

bit-encoder
Copy link

Week 1 HW Submission

Please fill out the information below in order to complete your assignment. Feel free to update this comment later if necessary.

  • Comfort rating on this assignment (1-5): 1|2|3|4|5
    Comfort rating is 4

  • Completion rating on this assignment: complete|incomplete
    Completion rating is "complete"

Your linter is evil. Tabs are supposed to be 4 spaces long, not the ungodly 2 spaces. For whatever reason, I convert instance -= 1 to instance--, and the linter complains. They have made themselves an enemy today.


// Easier if it was
// return super.render();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This class should inherit the render function in the parent class (do not override it, aka define it in DivElement).

Since DivElement inherits from HTMLElement, the render function doesn't need to be defined. It's inherited from HTMLElement. This would be an "override". See: https://javascript.info/class-inheritance#overriding-a-method

}, 1000);
};
console.log(instance);
instance -= 1; // the linter does not like "instance--". WTF?
Copy link
Contributor

Choose a reason for hiding this comment

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

The Airbnb lint rules probably disallowed this due to this weirdness in JavaScript with -- and spacing: https://eslint.org/docs/rules/no-plusplus

clearInterval(timerInterval);
}
start() {
let instance = this.seconds;
Copy link
Contributor

Choose a reason for hiding this comment

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

Refactor the code to avoid assigning this to a variable.

instance on line 9 could be replaced with this.seconds. Although this technically meets the requirement in the README.

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