-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
finished code #2286
base: master
Are you sure you want to change the base?
finished code #2286
Conversation
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.
Thank you for your hard work on the formatDate
function! 😊 While your implementation meets the core requirements, there are a few critical issues that need to be addressed before we can approve the pull request:
-
Parameter Naming: The parameter names in your function signature (
fromForm
andtoForm
) do not match the expected names (fromFormat
andtoFormat
). This inconsistency can lead to confusion and errors, so it's important to correct these names to align with the documentation. -
Missing Semicolon: There's a missing semicolon at the end of a return statement. Although JavaScript can often handle this, it's best practice to include semicolons to prevent potential issues in certain environments.
-
Script Path: Ensure the script path in your HTML file is correct. If
formatDate.js
is in asrc
directory, the path should besrc/formatDate.js
. This will ensure the script loads correctly.
Once these issues are resolved, your code will be in great shape! Keep up the great work, and don't hesitate to reach out if you have any questions. 🌟
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
src/formatDate.js
Outdated
function formatDate(date, fromFormat, toFormat) { | ||
// write code here | ||
|
||
function formatDate(dateStr, fromForm, toForm) { |
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.
The parameter names fromForm
and toForm
do not match the expected fromFormat
and toFormat
as described in the function's documentation. This could lead to confusion and should be corrected to maintain consistency.
src/formatDate.js
Outdated
return value; | ||
}).join(sepNew); | ||
|
||
return newFormArr |
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.
There is a missing semicolon at the end of this return statement. While JavaScript can often handle missing semicolons, it's a good practice to include them to avoid potential issues in certain environments.
src/index.html
Outdated
</head> | ||
<body> | ||
|
||
<script src="formatDate.js"></script> |
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.
The script source path is currently set to formatDate.js
. If the formatDate.js
file is located in the same directory as this HTML file, this is correct. However, if formatDate.js
is located in the src
directory, the path should be src/formatDate.js
.
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.
Review Summary
Great job on addressing the issues in your formatDate
function implementation! 🎉 You've successfully corrected the parameter names to fromFormat
and toFormat
, and ensured the script path is correctly set as src/formatDate.js
. These changes align well with the task requirements.
However, there's a minor issue with a missing semicolon at the end of a return statement. While JavaScript can often handle this, it's a best practice to include semicolons to prevent potential issues in certain environments. Make sure to address this in future implementations to maintain code quality.
Overall, your solution meets the task requirements, and I'm approving this pull request to help you move forward with your learning. Keep up the good work, and continue to refine your skills by learning from these experiences! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
return value; | ||
}).join(sepNew); | ||
|
||
return newFormArr; |
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.
There's a missing semicolon at the end of this return statement. Although JavaScript can often handle this, it's best practice to include semicolons to prevent potential issues in certain environments.
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.
Как отсутствует ??? ))) А єто что,- return newFormArr;
No description provided.