Skip to content

Conversation

@dianadenwik
Copy link

No description provided.

@github-actions
Copy link

📝 HackYourFuture auto grade

Assignment Score: 0 / 100 ✅

Status: ✅ Passed
Minimum score to pass: 0
🧪 The auto grade is experimental and still being improved

Test Details

@mnvacym mnvacym self-assigned this Feb 1, 2026
const cleanBook = bookName.toLowerCase();

const containWord = cleanBook.includes(cleanSearch);
return containWord;
Copy link

Choose a reason for hiding this comment

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

You created clear variables with easy to read logics, well done!

But what if I provide an empty string? Or what if I call the isBookApplicable function without a parameter?

console.log(isBookApplicable(""));
console.log(isBookApplicable());

That's why, in software engineering, it's very important to first consider all the requirements and error cases that need to be handled ("Error Handling").

const datePart = dateString.slice(4); // "10-21-1983"

const first = Number(datePart.slice(0, 2));
const second = Number(datePart.slice(3, 5));
Copy link

Choose a reason for hiding this comment

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

The variable names first and second are not clear enough. It would be hard for future developers to tell what is first and what is second at first glance.

// convertDaysToHours,
// convertHoursToDays,
// convertMinutesToSeconds,
// convertSecondsToMinutes
Copy link

Choose a reason for hiding this comment

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

Please try to avoid using excessive comments.


export function convertSecondsToMinutes(seconds) {
return seconds / 60;
}
Copy link

Choose a reason for hiding this comment

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

You implemented all the requirements, well done!

if (celsius < 0) return "Status: Freezing";
if (celsius < 10) return "Status: Cold";
if (celsius < 20) return "Status: Mild";
if (celsius < 30) return "Status: Warm";
Copy link

Choose a reason for hiding this comment

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

Nice refactoring of status logic 👏

console.log(getStatusCelsius(celsius));
printWindChill(cityNameValue, celsius, windSpeed);
console.log("---");
} No newline at end of file
Copy link

Choose a reason for hiding this comment

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

Your refactoring is incomplete. You also need to call the printWeatherReport with parameters. Did you manage to run this code? Because when you run, you should have seen that there are some errors that you need to resolve. But you're almost there. And keep in mind that when you run your logic, the output should be the same as the original file.

@mnvacym mnvacym added the Reviewed This assignment has been reivewed by a mentor and a feedback has been provided label Feb 1, 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