From 478db6832a93e2395467464cea82529a4a9eb5a6 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Fri, 3 Dec 2021 14:48:50 +0530 Subject: [PATCH] Delete Project 1 copy.js --- Chapter 14/Project 1 copy.js | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 Chapter 14/Project 1 copy.js diff --git a/Chapter 14/Project 1 copy.js b/Chapter 14/Project 1 copy.js deleted file mode 100644 index 85218a0..0000000 --- a/Chapter 14/Project 1 copy.js +++ /dev/null @@ -1,33 +0,0 @@ -const allowed = ["1234", "pass", "apple"]; - -function passwordChecker(pass) { - return allowed.includes(pass); -} - -function login(password) { - return new Promise((resolve, reject) => { - if (passwordChecker(password)) { - resolve({ - status: true - }) - } else { - reject({ - status: false - }) - } - }) -} - -function checker(pass) { - login(pass) - .then(token => { - console.log("Approve:"); - console.log(token) - }) - .catch(value => { - console.log("Reject:"); - console.log(value) - }) -} -checker("1234"); -checker("wrong");