-
-
Notifications
You must be signed in to change notification settings - Fork 73
LONDON-JAN-25 | ANDREI FILIPPOV | Module-Data Flows | WEEK 3 feature/xkcd #200
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: main
Are you sure you want to change the base?
Conversation
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.
Code looks good and clean.
fetch/programmer-humour/fetch.js
Outdated
@@ -0,0 +1,17 @@ | |||
"use strict"; | |||
const img = document.querySelector("img"); |
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 a good practice to append a suffix like "Elem" to a name for variables that store a DOM element.
fetch/programmer-humour/index.html
Outdated
<div id="errorMessage"></div> | ||
<img src="" /> |
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.
Why assign an id attribute to one of the elements but not the other?
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.
I did this because there’s only one image on the page, so I can select it by tag name. As for the div element, I wasn’t sure how many there might be in the future, so I decided to assign it an ID in advance.
Learners, PR Template
Self checklist
Changelist
Done Programmer Humour application
Questions
no questions