-
Notifications
You must be signed in to change notification settings - Fork 18
Yana P #2
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?
Yana P #2
Conversation
📝 HackYourFuture auto gradeAssignment Score: 0 / 100 ✅Status: ✅ Passed Test Details |
mo92othman
left a comment
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.
Hi @YanaP1312, well done! 👍
Good job refactoring the code in Task 4. You show a good understanding of the DRY principle. Good luck in the next modules!
| const bookName = "The fundamentals of JavaScript".toLowerCase(); | ||
| const pureString = searchString.trim().toLowerCase(); | ||
|
|
||
| if(!pureString) return false; |
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.
Nice that you're checking this!
| const first = Number(date.substring(0, firstDash)); | ||
| const second = Number(date.substring(firstDash + 1, lastDash)); | ||
| const third = Number(date.substring(lastDash + 1)); |
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.
Nice, this works correctly 👍
You could also use split("-") here, which would make the code easier to read and maintain.
Minor note: more descriptive variable names (like day or month) can improve readability, but this is also fine at this stage.
| export const convertHoursToMinutes = hours => hours * 60; | ||
|
|
||
| export const convertMinutesToHours = minutes => minutes / 60; | ||
|
|
||
| export const convertDaysToHours = days => days * 24; | ||
|
|
||
| export const convertHoursToDays = hours => hours / 24; | ||
|
|
||
| export const convertMinutesToSeconds = minutes => minutes * 60; | ||
|
|
||
| export const convertSecondsToMinutes = seconds => seconds / 60; No newline at end of file |
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.
Nice use of arrow functions 👍
| const part_1 = weatherReport(city, celsius); | ||
| const part_2 = windChillCalculation(city, celsius, speed); |
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.
Minor suggestions: use more descriptive variable names instead of part_1 and part_2 .
Done tasks for week-3