From 72dcb135673929395b57a5a8c5312fabd4e57079 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 11 May 2019 19:12:28 -0700 Subject: [PATCH] solved #1 --- exercises.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/exercises.js b/exercises.js index 1b0eaf1..def3de2 100644 --- a/exercises.js +++ b/exercises.js @@ -11,6 +11,8 @@ if(today === "Friday"){ 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. */ +console.log('test'); + /*if(today === "Friday"){ return "Let's Party!"; }else{ @@ -29,6 +31,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 >= 18){ + return 'Go ahead and vote!' + } +} + +console.log(canVote(19)); /* * #2