JavaScript Dynamic Greeting. Fun project for beginner

I build a fun coding project for beginner level who love JavaScript. Here:
I hope you will enjoy it. Have fun and happy coding :slight_smile:

Another approach to the greetings function for this project:

function greetings(){
  var timesOfDay = {Morning: [0,12], Afternoon: [12,17], Evening: [17,20], Night: [20,24]};
  var hour = new Date().getHours();
  for (var when in timesOfDay) {
    if (hour >= timesOfDay[when][0] && hour < timesOfDay[when][1]) return when; 
1 Like