As has already been stated, you can use:
lemons && document.write("foo gave me a bar");
or
if (lemons) document.write("foo gave me a bar");
If, however, you wish to use the one line if
statement to short-circuit a function though, you'd need to go with the bracket-less version like so:
if (lemons) return "foo gave me a bar";
as
lemons && return "foo gave me a bar"; // does not work!
will give you a SyntaxError: Unexpected keyword 'return'