We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c1d6c3 commit 5717b57Copy full SHA for 5717b57
1 file changed
buyaccoutbalance.js
@@ -0,0 +1,17 @@
1
+//Simple App showing Account Balance after Purchase
2
+
3
+var accountBalance = 500;
4
+var shoe = 700;
5
+var coupon = 900;
6
7
+if (accountBalance >= shoe){
8
+ accountBalance -= shoe;
9
+ console.log("Purchase was sucessful and your account balance is: " + accountBalance);
10
+}
11
+else if (shoe - coupon <= accountBalance){
12
+ accountBalance -= shoe - coupon;
13
+ console.log("We just bought an amazing shoe using a COUPON");
14
+ console.log("Our Account Balance is " + accountBalance);
15
+} else {
16
+ console.log("You aint got enough geez bra!");
17
0 commit comments