Javascript 3 project branch#7
Open
spiropoulos94 wants to merge 23 commits intoSocialHackerCreteClass:Nikos-Spiropoulosfrom
Open
Javascript 3 project branch#7spiropoulos94 wants to merge 23 commits intoSocialHackerCreteClass:Nikos-Spiropoulosfrom
spiropoulos94 wants to merge 23 commits intoSocialHackerCreteClass:Nikos-Spiropoulosfrom
Conversation
| let reposBanner = document.createElement('H1'); | ||
| reposBanner.innerHTML = 'HYF REPOSITORIES'; | ||
| document.getElementById('root').appendChild(reposBanner); | ||
| reposBanner.className += 'banner'; |
There was a problem hiding this comment.
There should be as little code as possible that leaves outside of a function. It is better to place this code inside a init() function of example and just call init at the beginning of your code
| let reposIndices = []; | ||
| for (let x = 0; x < 10; x++) { | ||
| reposIndices.push(repos[x]); | ||
| } |
There was a problem hiding this comment.
This is a classic case of a map function
| a.setAttribute('target', '_blank'); | ||
| createAndAppend('p', ul, { text: `Description : ${repo.description}` }); | ||
| createAndAppend('p', ul, { text: `Forks : ${repo.forks}` }); | ||
| var dateobj = new Date(repo.updated_at); |
There was a problem hiding this comment.
Try not to use var. Prefer const or let
homework/index.js
Outdated
| } | ||
|
|
||
| repos = reposIndices; | ||
| console.log(repos); |
There was a problem hiding this comment.
Try not to use console.log in your final code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.