Eine Zeile, wenn Anweisung JavaScript
if (lemons) document.write("foo gave me a bar");
CodeHelper
if (lemons) document.write("foo gave me a bar");
//else if statement shorthand
y = (x === 2) ? 1 : (x === 3) ? 2 : (x === 4) ? 7 : 1000;
// using Short-circuit Evaluation Shorthand.
// a !== 2 : else condition
// 'yes' : result of if condition
var a = 46,
var b = a !== 46 || 'yes';