Task:
Complete the expression with a
template literal
that will use the provided variables and evaluate to a string of: There are 4 packets containing 2 cupcakes in each, giving a total of 8 cupcakes
Code:
const product = ‘cupcakes’;
const numberOfPackets = 4;
const numberPerPacket = 2;
const report = numberOfPackets * numberPerPacket;
const message = There are ${numberOfPackets} packets containing ${numberPerPacket} ${product} in each, giving a total of ${report} ${product}.
;
console.log(message);