Skip to content

Commit 4acde99

Browse files
committed
finished exercise devleagueprep#1
1 parent c1466eb commit 4acde99

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

exercises.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,16 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
2929
* The function will return true if the number passed into the function is equal to or greater than Hawaii's voting age. Console.log your result.
3030
*/
3131

32-
console.log('test');
33-
console.log('anotherTest');
32+
function canVote(age) {
33+
if(age >= 18){
34+
return 'yes you can vote mah man';
35+
}else{
36+
return 'sorry bruh you still too young'
37+
}
38+
}
39+
40+
console.log(canVote(19));
41+
3442

3543
/*
3644
* #2

0 commit comments

Comments
 (0)