1. Calculate total price using template literal.
let pencilPrice = 10;
let eraserPrice = 5;
// let output = "The total price is : " + (pencilPrice + eraserPrice) + " Rupees. ";
console.log(`The total price is : ${pencilPrice + eraserPrice} Rupees.`);
No comments:
Post a Comment