Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

finished code #2286

wants to merge 2 commits into from

Conversation

Gennadiy99
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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:

  1. Parameter Naming: The parameter names in your function signature (fromForm and toForm) do not match the expected names (fromFormat and toFormat). This inconsistency can lead to confusion and errors, so it's important to correct these names to align with the documentation.

  2. 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.

  3. Script Path: Ensure the script path in your HTML file is correct. If formatDate.js is in a src directory, the path should be src/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.

function formatDate(date, fromFormat, toFormat) {
// write code here

function formatDate(dateStr, fromForm, toForm) {

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.

return value;
}).join(sepNew);

return newFormArr

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>

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.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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;

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.

Copy link
Author

Choose a reason for hiding this comment

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

Как отсутствует ??? ))) А єто что,- return newFormArr;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants