How to Display Content according to Current time of the Day?

Is there a way to change the content of a text dynamically based on time of the day. I would like to display different texts according to the time of the day for my client. Example. “Good morning” during the day and “Good evening” in the afternoon. Any input shall be valued! ThanX!

Depending on the hours you can change the text value

const hours = new Date().getHours()

This isn’t clicking with me. Could you please elaborate for me. Thanks

Thanks. Wil do!

@dee4charlotte your welcome