if statement javascript one line ?
snippet in javascript

if statement javascript one line ?

user888

(lemons) ? alert("please give me a lemonade") : alert("then give me a beer");

one line if statement javascript

user6054

if (lemons) document.write("foo gave me a bar");