Hi everyone i would like to get your opinion about this project.
Please say everting you can I am a new developer and I really want to leran more
thx
[javascript]
let today = new Date();
let hours = today.getHours();
const arrayOfWords = [‘Dont look back, you are not going that way!’,“One day your sotry,will be someone guide!”,“At the darkest hours, the bravest shine”];
const MorningWords =["Good morning frined, always remeber ","Hi how are this morning?, never forget ","Looks like its gonna be a good day , so I always say "];
const afterNoonWords =["so how is your day so far? just wanted to say someting, ","Almost evening that is good news, here somting good for you, ","Nothing better then a few words no? , "];
const eveningWords = [" I think we can call it for today , never forget ","was it rough today? never give up cuase ","thats it warrior time to sleep just remember "];
let randomMessage = arrayOfWords[Math.floor(Math.random()*arrayOfWords.length)];
if(hours >=6 && hours <= 12){
let randomDaychoice = MorningWords[Math.floor(Math.random()*MorningWords.length)];
console.log(randomDaychoice + randomMessage);
}
else if (hours > 12 && hours<= 18){
let randomafterNoonWords = arrayOfWords[Math.floor(Math.random()*arrayOfWords.length)];
console.log(randomafterNoonWords + randomMessage);
}
else if (hours > 18 && hourse <=00){
let randomeveningChoice = eveningWords[Math.floor(Math.random()*eveningWords.length)];
console.log(randomeveningChoice + randomMessage);
}
else{
console.log("I think I am going to sleep now...");
}
[/javascript]