Answers for "ternary operator return date greeting"

0

ternary operator return date greeting

var now = new Date();
var greeting = "Good" + ((now.getHours() > 17) ? " evening." : " day.");
Posted by: Guest on October-17-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language