conditionalOperator.js 239 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 var a = 10; var b = 20; var linebreak = "<br />"; console.log ("((a > b) ? 100 : 200) => "); result = (a > b) ? 100 : 200; console.log(result); console.log ("((a < b) ? 100 : 200) => "); result = (a < b) ? 100 : 200; console.log(result);