Skip to content

Completed homework.#18

Open
dgallinger wants to merge 2 commits intofrontend-application-development-uw20:masterfrom
dgallinger:master
Open

Completed homework.#18
dgallinger wants to merge 2 commits intofrontend-application-development-uw20:masterfrom
dgallinger:master

Conversation

@dgallinger
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): 3
  • Completion rating on this assignment: complete

@dgallinger
Copy link
Author

Completed homework.

@dgallinger dgallinger closed this Apr 16, 2020
@dgallinger dgallinger reopened this Apr 16, 2020

class DivElement extends HTMLElements {
constructor(content) {
super(content);

Choose a reason for hiding this comment

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

Suggested change
super(content);
super('div', content);

Then you don't need lines 8 or 9

import people from './people.json';

people.forEach(function (person) {
people.forEach((person) => {

Choose a reason for hiding this comment

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

Suggested change
people.forEach((person) => {
people.forEach(({ name, email, phone }) => {

}
}

Timer.prototype.start = function () {

Choose a reason for hiding this comment

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

This should be moved into the Timer constructor.

Timer.prototype.start = function () {
var instance = this;
var timerInterval = setInterval(function () {
const instance = this;

Choose a reason for hiding this comment

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

Once in constructor, you can drop this line

var timerInterval = setInterval(function () {
const instance = this;
const timerInterval = setInterval(() => {
if (instance.seconds === 0) {

Choose a reason for hiding this comment

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

And reference this.seconds here.

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