Skip to content

Hassan A. - #4

Open
ElevenEight118 wants to merge 4 commits into
HackYourAssignment:mainfrom
ElevenEight118:main
Open

ElevenEight118 wants to merge 4 commits into
HackYourAssignment:mainfrom
ElevenEight118:main

Conversation

@ElevenEight118

Copy link
Copy Markdown

No description provided.

noJokesCoder added a commit to noJokesCoder/c56-core-week-3 that referenced this pull request Nov 18, 2026
@RHSebregts
RHSebregts self-requested a review November 25, 2026 22:05

@RHSebregts RHSebregts left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi!

Overall good work on these tasks. Task 2 needs some real attention, the rest is pretty good as is!

Thank you for your efforts, and all the best of luck the rest of the course!

Best wishes,

Robbert-Jan

Comment thread task-1/book.js
function isBookApplicable(searchString) {
// Your code here
const bookTitle = "The fundamentals of JavaScript";
const isApplicable = bookTitle.toLowerCase().includes(searchString.toLowerCase().trim())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A super tiny nitpick here would be that since we know we always want the book title lowercased, we might as well just save the const already lowercased. That way you don't have to run the .toLowercase() on that const every time you run the function.

Comment thread task-2/parse-date.js
year: dateValue[2]
}

} else {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This else is too loose, we can also enter banana as a date format. If you just add another if and a return in the end, you'd not even need the else!

Comment thread task-2/parse-date.js
Comment on lines +7 to +9
Number(dateValue[0]);
Number(dateValue[1]);
Number(dateValue[2]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The returned values are still strings, not numbers, so this needs an extra step.

Comment thread task-2/parse-date.js
// Your code here
function parseDateString(dateString) {

const parts = dateString.split(" ")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please use a more specific name, now it's a bit of guess what these parts are a part of.

Comment thread task-2/parse-date.js

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In my testing I could give values that don't make sense at all, and still get a response. It might be nice to look into some sort of check on that, so that we can't have banana-apple-pear as a date.

Comment thread task-3/date.js

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lgtm :)

Comment thread task-4/cleanup.js
Comment on lines +3 to +19
let tempFahrenheit = (tempCelsius * 9 / 5) + 32;
let tempKelvin = tempCelsius + 273.15;
console.log(`Weather Report for ${cityName}`)
console.log(`Temperature: ${tempCelsius}`)
console.log(`Temperature: ${tempFahrenheit}`)
console.log(`Temperature: ${tempKelvin}`)
if (tempCelsius < 0) {
console.log("Status: Freezing");
} else if (tempCelsius >= 0 && tempCelsius < 10) {
console.log("Status: Cold");
} else if (tempCelsius >= 10 && tempCelsius < 20) {
console.log("Status: Mild");
} else if (tempCelsius >= 20 && tempCelsius < 30) {
console.log("Status: Warm");
} else {
console.log("Status: Hot");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please add some spaces to this, to give a visual separation of code. This improves readability.

@RHSebregts RHSebregts added Reviewed This assignment has been reivewed by a mentor and a feedback has been provided and removed Review in progress labels Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed This assignment has been reivewed by a mentor and a feedback has been provided

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants