-
Notifications
You must be signed in to change notification settings - Fork 4
Homework Week 2 Midy #8
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
base: Midyan-Hamdoun
Are you sure you want to change the base?
Conversation
homework/index.js
Outdated
function renderRepoDetails(repo, ul) { | ||
createAndAppend('li', ul, { text: repo.name }); | ||
function renderRepoDetails(repo, parent) { | ||
console.log(repo); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove any console.log statements used for debugging before committing
// This here finds the index of the repo we are looking for | ||
// using the value selected in `select` | ||
renderRepoDetails( | ||
repos[repos.findIndex(el => el.name === select.options[select.selectedIndex].value)], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to use this instead of select here in order to make this function reusable if needed
Homework week 3 is here too for some reason! |
} | ||
return res.status === 200 ? res.json() : null; | ||
}); | ||
static async fetchJSON(url) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
No description provided.