restructured

This commit is contained in:
Karan 2021-12-03 14:41:37 +05:30 committed by GitHub
parent 9b47b5e5ff
commit b378583f52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,24 +9,24 @@ function login(password) {
if (passwordChecker(password)) {
resolve({
status: true
})
});
} else {
reject({
status: false
})
});
}
})
});
}
function checker(pass) {
login(pass)
.then(token => {
console.log("Approve:");
console.log(token)
console.log(token);
})
.catch(value => {
console.log("Reject:");
console.log(value)
console.log(value);
})
}
checker("1234");