const tasks = [
{name: "Finish project report", priority: 1, completed: false},
{name: "Water the plants", priority: 3, completed: true},
{name: "Reply to emails", priority: 2, completed: true},
{name: "Prepare presentation slides", priority: 1, completed: false},
{name: "Organize desk", priority: 2, completed: true},
{name: "Watch tutorial videos", priority: 3, completed: false}
]
let incompletedTasks = 0;
for (var i = 0; i < tasks.length; i++) {
if (tasks[i].completed == false) {
incompletedTasks++
}
}
for (let i = 0; i < tasks.length; i++) {
console.log(`Task Name: ${tasks[i].name}`)
let priority = tasks[i].priority
if (priority === 1 && tasks[i].completed == false) {
console.log("Get this task done as soon as possible")
} else if (priority === 2 && tasks[i].completed == false) {
console.log("This task needs to be done")
} else if (priority === 3 && tasks[i].completed == false) {
console.log("Try to get this task done when you can.")
}
console.log(`Task Completed: ${tasks[i].completed}`)
if (tasks[i].completed === true) {
console.log("Good job on finishing your task!")
}
console.log(" ")
}
console.log(`There are ${incompletedTasks} incomplete tasks.`)
var day = prompt("What's the day today?").toLowerCase();
switch (day) {
case "monday":
console.log('"The secret of getting ahead is getting started." — Mark Twain')
break;
case "tuesday":
console.log('"Don’t watch the clock; do what it does. Keep going." — Sam Levenson')
break;
case "wednesday":
console.log('"It’s not whether you get knocked down, it’s whether you get up." — Vince Lombardi')
break;
case "thursday":
console.log('"Success is the sum of small efforts, repeated day in and day out." — Robert Collier')
break;
case "friday":
console.log('"Make each day your masterpiece." — John Wooden')
break;
case "saturday":
console.log('"Rest, but never quit. Even the sun has a sinking spell each evening. But it always rises the next morning." — Unknown');
break;
case "sunday":
console.log('"Recharge your soul, reflect on your growth, and prepare for greatness." — Anonymous');
break;
default:
console.log("Pretty sure that's not a day but here's a quote anyways:")
console.log('"Discipline is choosing between what you want now and what you want most." — Abraham Lincoln')
}