[javascript] JavaScript single line 'if' statement - best syntax, this alternative?