Skip to content

Commit bedc5a4

Browse files
committed
Finished exercise devleagueprep#2
1 parent 4acde99 commit bedc5a4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

exercises.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function canVote(age) {
3333
if(age >= 18){
3434
return 'yes you can vote mah man';
3535
}else{
36-
return 'sorry bruh you still too young'
36+
return 'sorry bruh you still too young';
3737
}
3838
}
3939

@@ -52,6 +52,14 @@ console.log(canVote(19));
5252
* Console.log your result.
5353
*/
5454

55+
function login(password) {
56+
if(password === 'test1234'){
57+
return "Great job! your password was correct!";
58+
}else{
59+
return "please re-enter your password, it came back incorrect :(";
60+
}
61+
}
62+
console.log(login("test1234"));
5563

5664
/*
5765
* #3

0 commit comments

Comments
 (0)