Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created September 26, 2017 03:58
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/2799427a9f246bcd63674b75e647b771 to your computer and use it in GitHub Desktop.
Save codecademydev/2799427a9f246bcd63674b75e647b771 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