Skip to content

Commit 1ed84b9

Browse files
JonJon
authored andcommitted
1 parent 7884c33 commit 1ed84b9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

exercises.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ 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+
function canVote(age){
33+
if(age >= 18){
34+
return "true";
35+
}else{
36+
return "false"
37+
}
38+
}
39+
40+
console.log("1. canVote " + canVote(18));
3241

3342
/*
3443
* #2
@@ -43,6 +52,7 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
4352
*/
4453

4554

55+
4656
/*
4757
* #3
4858
* Function - isGreaterThan

0 commit comments

Comments
 (0)