// If Else test ? expression1 : expression2 // If Else without {} if (now.getHours() > 17) greeting += " evening."; else greeting += " day."; // If Else with return variable var s = (x != null) ? x : "";