-
Notifications
You must be signed in to change notification settings - Fork 131
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
feat(m4): add solution exe-006 two-word-random-password #3548
base: main
Are you sure you want to change the base?
feat(m4): add solution exe-006 two-word-random-password #3548
Conversation
Added solutions and comments |
// Check the conditions | ||
if ( | ||
firstWordPassword.length >= 3 && | ||
firstWordPassword.length <= 7 && |
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.
Why don't you perform this check on line 15/16 so that if the password is incorrect, it generates a valid one?
Even better, use a function to achieve this ;-)
firstWordPassword.length >= 3 && | ||
firstWordPassword.length <= 7 && | ||
secondWordPassword.length >= 3 && | ||
secondWordPassword.length <= 7 && |
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.
Same suggestion line 17/18.
}) | ||
.catch((error) => { | ||
console.log('The program is unable to open the file you indicated'); | ||
}); |
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.
We can try to solve the problem and do some refactoring during the mentorship ;-)
No description provided.