Jika statemnt shorthand js tanpa orang lain

//else if statement shorthand
y = (x === 2) ? 1 : (x === 3) ? 2 : (x === 4) ? 7 : 1000;
Philan ISithembiso