how to write if statement in js in one line code example
Example: one line if else if statement javascript
var variable = (condition) ? (true block) : ((condition2) ? (true block2) : (else block2))
var variable = (condition) ? (true block) : ((condition2) ? (true block2) : (else block2))