//else if with ternary if var x = Number(prompt('Enter number')); (x < 10) ? alert("Your number C") : (x >= 10 && x <= 15) ? alert("Your number B") : (x >= 16 && x <= 20) ? alert("Your number A") : alert("Other");