Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created September 26, 2017 07:56
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 codecademydev/7e942f0c7140426287129627f5eabba5 to your computer and use it in GitHub Desktop.
Save codecademydev/7e942f0c7140426287129627f5eabba5 to your computer and use it in GitHub Desktop.
Codecademy export
var orderCount = 0;
function takeOrder(topping,crustType) {
console.log('Order: pizza topped with ' + topping);
orderCount = orderCount + 1;
}
function getSubTotal(itemCount){
return itemCount * 7.5
}
takeOrder("thin crust","bacon");
takeOrder("dark crust","meat");
takeOrder("blue crust","chicken");
takeOrder("red crust","turkey");
console.log(getSubTotal(4));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment