-
Notifications
You must be signed in to change notification settings - Fork 34
Luke Sikuade News Reader #28
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: master
Are you sure you want to change the base?
Conversation
README.md
Outdated
| # How to Use Grabber | ||
|
|
||
| - [ ] Display images for tablet and desktop screens only | ||
| Simply download and unpack the .zip file onto your machine, then open up the index.html. |
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.
Is there a zip file?
| "uri" should be undefined the first time, but not subsequent times | ||
| for purposes of pagination. | ||
| */ | ||
| function grabData(uri) { |
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.
Rather than using if/else you can use default parameter values which will replace the parameter value when it is undefined. For example
function grabData(uri = url){
That way if uri is undefined, the url value will be applied instead
| //As they pass in, create list elements from them. | ||
| //Call populateNewsFeed on each one. | ||
| function createListElement(articleObject) { | ||
| /*CREATE THE LIST ITEM WITH ATTRIBUTES AND ARTICLE CONTENT */ |
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.
Would this be easier to generate using HTML string templates?
| } | ||
|
|
||
| //PROGRAM START | ||
| document.addEventListener("DOMContentLoaded", grabData()); |
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
|
Good work |
No description provided.