Skip to content

Fletcher Bonds - homework complete#10

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

Fletcher Bonds - homework complete#10
fbonds wants to merge 2 commits intofrontend-application-development-uw20:masterfrom
fbonds:master

Conversation

@fbonds
Copy link

@fbonds fbonds commented Apr 13, 2020

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.5
  • Completion rating on this assignment: complete

// Define class here
class DivElement extends HTMLElement {
constructor(content) {
super(content);
Copy link

@t1mwillis t1mwillis Apr 24, 2020

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 can remove the two lines below this.

const lastName = names[1];
const email = person.email;
const phone = person.phone;
people.forEach(([name, email, phone] = [people.name, people.email, people.phone]) => {

Choose a reason for hiding this comment

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

This is one way to do it!

I was thinking more like

people.forEach(({name, email, phone}) => {
  const [firstName, lastName] = name.split[' ']
  return `First name: ${firstName}
    Last name: ${lastName}
    Email: ${email}
    Phone number: ${phone}`;
})

const email = person.email;
const phone = person.phone;
people.forEach(([name, email, phone] = [people.name, people.email, people.phone]) => {
const { firstName, lastName } = name.split(' ');
Copy link

@t1mwillis t1mwillis Apr 24, 2020

Choose a reason for hiding this comment

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

This will not work, name.split returns an array.
const [firstName, lastName] = name.split(' ')

Copy link
Author

Choose a reason for hiding this comment

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

ah.. dang. I was judging success by 'npm test'. I don't think I actually tried to run any of them individually. 😳

this.seconds -= 1;
}, 1000);
}
}

Choose a reason for hiding this comment

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

Great work

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