Skip to content

London | 26-ITP-May | Damilola Odumosu | Sprint 3 | Programmer humour - #551

Open
d-odumosu wants to merge 1 commit into
CodeYourFuture:mainfrom
d-odumosu:programmer-humour
Open

London | 26-ITP-May | Damilola Odumosu | Sprint 3 | Programmer humour#551
d-odumosu wants to merge 1 commit into
CodeYourFuture:mainfrom
d-odumosu:programmer-humour

Conversation

@d-odumosu

Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Completed tasks for programmer humour

@d-odumosu d-odumosu added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 3 Assigned during Sprint 3 of this module labels Aug 14, 2026
@webmonch webmonch added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 21, 2026
alt.textContent = result.alt;
console.log(result);
} catch (error) {
console.log(error.message);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a better function to log errors?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yes, console.error

try {
const response = await fetch(url);
if (!response.ok) {
throw new Error(`Response status: ${response.status}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of exception here!

const image = document.getElementById("image");
const alt = document.getElementById("alt");

async function getImg() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this function name clearly describes what it does?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe getImage could be better?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mostly thinking here that it in addition to getting image it sets values for some text fields, but this is just a nitpick.

@webmonch webmonch added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants