Saludo de fecha de devolución del operador ternario
var now = new Date();
var greeting = "Good" + ((now.getHours() > 17) ? " evening." : " day.");
Lovely Lizard
var now = new Date();
var greeting = "Good" + ((now.getHours() > 17) ? " evening." : " day.");