Posts by user179295 • 49 points
1 post
-
4
votes3
answers717
viewsA: Ternary operator with three possible conditions
let status = 1; const sendStatus = `<i class="${status == 0 ? 'icon-0' : status == 1 ? 'icon-1' : 'icon-2'}"></i>`; let status = 1; const sendStatus = `<i class="${'icon-' +…
javascriptanswered user179295 49