Skip to content

Instantly share code, notes, and snippets.

@rihannaKe
Created December 7, 2017 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rihannaKe/f8568348392270939cdf1660774296b4 to your computer and use it in GitHub Desktop.
Save rihannaKe/f8568348392270939cdf1660774296b4 to your computer and use it in GitHub Desktop.
var balance = 350;
var checkBalance = true;
var isActive = false;
if(checkBalance === true){
if(isActive === true && balance > 0){
console.log("Your balance is $"+ balance +".");
} else {
if(isActive === false){
console.log("Your account is no longer active.");
} else {
if (balance === 0){
console.log("Your account is empty.");
} else {
console.log("Your balance is negetive. Please contact bank.");
}
}
}
} else {
console.log("Thank you, have a nice day!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment