Skip to content

Commit

Permalink
completed devleagueprep#1
Browse files Browse the repository at this point in the history
  • Loading branch information
Jess Manapul authored and Jess Manapul committed Feb 9, 2019
1 parent 43d80e7 commit 36b45c7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions exercises.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if(today === "Friday"){
return "Let's Party!";
};*/


/*
If/else statements = Evaluates (or checks) a condition. If the condition is true, the first code block is executed. If the condition is false, the second code block is executed instead.
*/
Expand All @@ -29,6 +30,13 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
* 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.
*/

function canVote (age) {
if (age > 17) return true;
else return false;
}

console.log(canVote(17));
console.log(canVote(18));

/*
* #2
Expand All @@ -43,6 +51,7 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
*/



/*
* #3
* Function - isGreaterThan
Expand Down

0 comments on commit 36b45c7

Please sign in to comment.