Pizza order – extra cheese

I’m having problems understanding JavaScript. I have the following assignment. I’m trying to add to the final cost. the Extra Cheese.

var extraCheeseUpcharge = 1.5
var extraCheese = confirm("Would you like extra cheese?")

if (extraCheese == true) {
  pizza.extraCheese =  true;
  extraCheese = extraCheeseUpcharge + pizza.cost;
} else {
   pizza.extraCheese =  false;
  extraCheese = extraCheeseUpcharge - pizza.cost;
  
}