From 2a56b7cf0e612f4fdd0e75e81146dd03eaff6914 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Jun 2018 15:02:27 -1000 Subject: [PATCH] #2 js-logic --- exercises.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/exercises.js b/exercises.js index e8b5a10..b9b596c 100644 --- a/exercises.js +++ b/exercises.js @@ -49,8 +49,15 @@ console.log("1. Woo hoo! Can vote: ", canVote(19)); * The function will return the message: "Login Success!", if the string passed into the function is "test1234" * Console.log your result. */ - - +console.log("2---------------------"); +function login(password){ + if(password === "test1234"){ + return "Login Success!" + }else{ + return "Login FAILED!"; + } +} +console.log(login("test1235")); /* * #3 * Function - isGreaterThan