0

How can I make a welcome page

I want a code snippet of making the text change from hour (x) to hour (y) for example : I want my page to say "Good Morning" from hour (4) to hour (12)

11th Jan 2020, 8:32 PM
Eyad Farah
Eyad Farah - avatar
2 Respuestas
+ 3
let hour = new Date().getHours(); if (hour >= 4 && hour <= 12) console.log("Good Morning"); The rest is up to you.
11th Jan 2020, 8:55 PM
Calin Onofrei
Calin Onofrei - avatar