What is wrong with this code? if I call this function without any arguments, the expected output is "critical" instead "medium" is returned.
let labelBlock = (label="") =>{
label = label.toLowerCase();
const txt = label == "high" ? "High" : "medium" ? "Medium" : "Critical";
return `<span class="${txt.toLowerCase()}">${txt}</span>`;
}