JSFiddle - React, Tailwind, and code Playground

JavaScript

console.clear();

var Pain = 5;
var Legumes = 7;
var Riz = 8;
var Sauce = 4;
var Garniture;
var montant;
var TVA=7;
var Pizza;

Garniture = prompt('Entrez votre garniture (LEGUMES ou RIZ ou SAUCE)');

var montant = Pain + Garniture;
var total = montant + (montant * TVA);

if (Garniture.toUpperCase() === 'LEGUMES') {
document.write ('Le montant est de ' + (Pain + Legumes) + '$');
}

else if (Garniture.toUpperCase() === 'RIZ') {
document.write ('Le montant est de ' + (Pain + Riz) + '$');
}

else if (Garniture.toUpperCase() === 'SAUCE') {
document.write ('Le montant est de ' + (Pain + Sauce) + '$');
}

else {
document.write ('Veuillez entrer des informations valides');
}

console.log(montant)
console.log ('FACTURE');
console.log ('Une grande pizza: ' + Pizza + '$');
console.log ('Plus ' + Garniture);
console.log ('Votre facture est de: ' + Pain + Garniture + '$');