Single Line Condition In Javascript