Skip to content

Commit 5a7757f

Browse files
committed
updating return statement in password-validator.js
1 parent d5d16fa commit 5a7757f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Sprint-3/3-stretch/password-validator.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,14 @@ function passwordValidator(password) {
2424
const notInPreviousPasswords = !previousPasswords.includes(password);
2525
console.log(`previous password condition: ${notInPreviousPasswords}`);
2626

27-
if (
27+
return (
2828
lengthCondition &&
2929
uppercaseCondition &&
3030
lowercaseCondition &&
3131
numberCondition &&
3232
symbolCondition &&
3333
notInPreviousPasswords
34-
) {
35-
return true;
36-
} else {
37-
return false;
38-
}
34+
);
3935
}
4036

4137
module.exports = passwordValidator;

0 commit comments

Comments
 (0)