Skip to content

Commit

Permalink
completed #14
Browse files Browse the repository at this point in the history
  • Loading branch information
kinwail committed Jun 12, 2018
1 parent bb34650 commit 7730713
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions exercises.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,21 @@ console.log(moneyTrain(10));
* Invoke your function again.
* Console.log budget and doughnutBought again.
*/
var budget = 21;
var doughnutPrice = 5;
var doughnutBought = 0;

function buyDoughnut(){
if(budget >= doughnutPrice){
budget -=doughnutPrice;
doughnutBought++;
}
}
buyDoughnut();
console.log('budget', budget);
console.log('doughnut bought', doughnutBought)



/*Final Boss*/
/*Create a function name dailySpecials which takes in a parameter: `special`.
Expand Down

0 comments on commit 7730713

Please sign in to comment.