first commit

This commit is contained in:
Volodya
2023-10-19 12:29:42 +03:00
commit 4b192915ed
15 changed files with 655 additions and 0 deletions

10
greeting.js Normal file
View File

@@ -0,0 +1,10 @@
let currentDate = new Date();
global.date = currentDate;
module.exports.getMessage = function () {
let hour = currentDate.getHours();
if (hour > 16) return 'Добрый вечер, ' + global.name;
else if (hour > 10) return 'Добрый день, ' + name;
else return 'Доброе утро, ' + name;
};