Skip to content

Baraah A.#11

Open
thebaraah wants to merge 2 commits intoHackYourAssignment:mainfrom
thebaraah:main
Open

Baraah A.#11
thebaraah wants to merge 2 commits intoHackYourAssignment:mainfrom
thebaraah:main

Conversation

@thebaraah
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 normalSearch = searchString.trim().toLowerCase();
const normalTitle = bookTitle.toLowerCase();

return normalTitle.includes(normalSearch);
Copy link

Choose a reason for hiding this comment

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

You named variables very clearly, well done!

if (!searchString)
return false;

const normalSearch = searchString.trim().toLowerCase();
Copy link

Choose a reason for hiding this comment

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

Nice that you handle extra white space at the beginning and the end of the search string, but what if the search string has an extra space in between words?

@@ -1 +1,22 @@
// Your code here
function parseDateString(dateString) {
const [format, datePart]= dateString.split(" ");//splet by space
Copy link

Choose a reason for hiding this comment

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

Nice usage of Destructuring!

function parseDateString(dateString) {
const [format, datePart]= dateString.split(" ");//splet by space

const [first, second, year]= datePart.split("-").map(Number); //seprator and number
Copy link

Choose a reason for hiding this comment

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

Nice usage of map(Number)!

One thing is that 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.


const [first, second, year]= datePart.split("-").map(Number); //seprator and number

let day , month ;
Copy link

Choose a reason for hiding this comment

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

Formatting is a little off. There is an extra white space before the comma and semi-colon.

console.log(parseDateString("MDY 10-21-1983"));
console.log(parseDateString("DMY 21-10-1983"));
console.log(parseDateString("MDY 03-15-2024"));
console.log(parseDateString("DMY 15-03-2024"));
Copy link

Choose a reason for hiding this comment

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

You handled all the requirements, well done!

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, but please pay attention to the code formatting.

It is a good practice

  • to leave a space before and after an operator.
  • to remove the space before the semicolon.
  • keeping the function name on the same line with the function

printwindChill("Berlin",15,20);
printwindChill("Copenhagen",-5,25);
printwindChill("Cairo",30,10);
printwindChill("Istanbul",6,15); 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.

You used clear variable names and clear function names. And you implemented reusable functions in accordance with the separation of concerns principle; each function is responsible for one thing. Well done!

But your code doesn't work! Did you run this code? There are two small issues.

When you resolve those issues, you will see that your functions' output is not the same as the original file, and that is because of formatting the output. Pay attention to spaces and separators.

@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