Skip to content

Instantly share code, notes, and snippets.

@mariyadiminsky
Last active June 14, 2016 07:34
Show Gist options
  • Select an option

  • Save mariyadiminsky/8be701a14c4f35abb1dde42d2d61e07d to your computer and use it in GitHub Desktop.

Select an option

Save mariyadiminsky/8be701a14c4f35abb1dde42d2d61e07d to your computer and use it in GitHub Desktop.
function bunnyBailMoneyReceipt(bunnyName, bailoutCash) {
var bunnyTip = 100;
console.log(
`
Greetings ${bunnyName.toUpperCase()}, you have been bailed out!
Total: $${bailoutCash}
Tip: $${bunnyTip}
------------
Grand Total: $${bailoutCash + bunnyTip}
We hope you a pleasant carrot nip-free day!
`
);
}
bunnyBailMoneyReceipt('Bunny Burgerkins', 200);
// Enter the above code into your console to get this result:
/*
Greetings BUNNY BURGERKINS, you have been bailed out!
Total: $200
Tip: $100
------------
Grand Total: $300
We hope you a pleasant carrot nip-free day!
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment