ternary with or clause

ternary with or clause

by David McClelland

JavaScript

let a = 1;
let b = 2;
alert(a === 2 || b === 1 ? 'yes' : 'no');