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

add task solution #353

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

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

Great job on implementing the file copy function and handling errors! 🎉 Just a small suggestion: consider exiting the function after logging the error when the source and destination files are the same to prevent unnecessary execution. Keep up the good work!

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

Comment on lines +7 to +8
if (initialFile === targetFile) {
console.error('Same location');

Choose a reason for hiding this comment

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

This is a good check to ensure that the source and destination files are not the same. However, it might be beneficial to return or exit the function after logging the error to prevent further execution.

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