function showDate() {
let today = new Date();
let tomorrow = new Date(today.getTime() + (24 * 60 * 60 * 1000));
let date = tomorrow.getDate();
let month = tomorrow.getMonth() + 1;
let year = tomorrow.getFullYear();
return getFullDate(date) + '.' + getFullDate(month) + '.' + getFullDate(year);
}
function getFullDate(date) {
if(date < 10) {
date = '0' + date;
} else if(date > 2000) {
date = date - 2000;
} else {
date = date;
};
return date;
};
let newDate = showDate();
console.log(newDate);
function getSumNumber(number) {
let toArr = number.toString().split('');
let summ = 0;
for(let i = 0; i <= toArr.length - 1; i++) {
summ += +toArr[i];
};
return summ;
};
let result = getSumNumber(58769);
console.log(result) // 35
let k = 0;
for(; k < 3; k++) {
setTimeout(function() {
console.log(k);
}, 500);
};