going crazy now.
been trying to work on this problem.
this is the basis of this
espresso costs 1.40 served as shot
latte/cappuccino cost the same 8 ouce 1.95 12 ounce 2.35 16 ounce 2.75
american costs 1.20 for first 8 ounces .30 cents for each additional 8 ounce (0.0375 per ounce)
final price needs to be taxed 0.055.
(have not got that far)
<head><title>Coffee Shop Calculator </title></head>
drinkType = drinkType = prompt( " Please enter in the type of drink you would like " );
coffeeSize = coffeeSize = prompt( " please enter how many ounces you want " )
shotSize = shotSize = prompt( " Please enter how many shots extra you would like in your espressso ");
if(shotSize > '1')
espressoPrice = (0.50 * shotSize) - 0.50;
if coffeeSize == '8'
lattePrice = 1.95
cappuccinoPrice = 1.95
americanoPrice = 1.20
if(coffeeSize == '12')
lattePrice = 2.35
cappuccinoPrice = 2.35
if(coffeeSize == '16')
lattePrice = 2.75
cappuccinoPrice = 2.75
if(drinkType == 'Latte')
price = lattePrice * 0.055
if(drinkType == 'Cappuccino')
price = cappuccinoPrice * 0.055
the espresso cost is the only one that would work. the rest not.
i am just in the basics of javescript beginner course, so keep it to the basics of basics.