Skip to content

Commit fe465fa

Browse files
committed
Get rid of Object.keys method
1 parent a22b00f commit fe465fa

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

homework/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,26 +82,26 @@
8282
});
8383
const ul = createAndAppend('ul', contributesDiv);
8484

85-
Object.keys(contributors).forEach(contributor => {
85+
contributors.forEach(contributor => {
8686
const listItem = createAndAppend('li', ul, { class: 'list flex-div' });
8787
const hyperlink = createAndAppend('a', listItem, {
88-
href: contributors[contributor].html_url,
88+
href: contributor.html_url,
8989
target: '_blank',
9090
});
9191
createAndAppend('img', hyperlink, {
92-
src: contributors[contributor].avatar_url,
93-
alt: `${contributors[contributor].login} photo`,
92+
src: contributor.avatar_url,
93+
alt: `${contributor.login} photo`,
9494
});
9595

9696
const contributorInfoDiv = createAndAppend('div', hyperlink, {
9797
class: 'contributor-info flex-div',
9898
});
9999
createAndAppend('p', contributorInfoDiv, {
100100
class: 'contributorsName',
101-
text: contributors[contributor].login,
101+
text: contributor.login,
102102
});
103103
createAndAppend('p', contributorInfoDiv, {
104-
text: contributors[contributor].contributions,
104+
text: contributor.contributions,
105105
class: 'badge',
106106
});
107107
});

0 commit comments

Comments
 (0)