The code below runs without an error, but its result is wrong. Which statement correctly identifies the bug?
function price(size) {
let p = 0;
switch (size) {
case "S": p = 100;
case "M": p = 150;
case "L": p = 200;
}
return p;
}
console.log(price("S"), price("M"), price("L"));
Add break after each assignment (or return the price directly in each case) to get 100 150 200.