-
Notifications
You must be signed in to change notification settings - Fork 404
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
solution #273
base: master
Are you sure you want to change the base?
solution #273
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.
Good job!
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.
Good.
Check some comments.
Thanks)
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const [, , sourceFile, destinationFile] = process.argv; |
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.
const [, , sourceFile, destinationFile] = process.argv; | |
const [_, __ , sourceFile, destinationFile] = process.argv; |
But best way use slice for this case
|
||
function copyFile() { | ||
if (!sourceFile || !destinationFile) { | ||
console.error('Usage: node app.js <sourceFile> <destinationFile>'); |
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.
All messages you can move to constants.
For all file*
No description provided.