Skip to content

Commit fad0ebb

Browse files
committed
devleagueprep#1 complete
1 parent 7884c33 commit fad0ebb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

exercises.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ 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+
console.log(canVote(18))
3240

3341
/*
3442
* #2

0 commit comments

Comments
 (0)