function makeTask(data) {
const completed = false;
const category = "General";
const priority = "Normal";
}
*Вызов makeTask({})
возвращает { category: "General", priority: "Normal", completed: false }
*Вызов makeTask({ category: "Homemade", priority: "Low", text: "Take out the trash" })
возвращает { category: "Homemade", priority: "Low", text: "Take out the trash", completed: false }
*Вызов makeTask({ category: "Finance", text: "Take interest" })
возвращает { category: "Finance", priority: "Normal", text: "Take interest", completed: false }
*Вызов makeTask({ priority: "Low", text: "Choose shampoo" })
возвращает { category: "General", priority: "Low", text: "Choose shampoo", completed: false }
*Вызов makeTask({ text: "Buy bread" })
возвращает { category: "General", priority: "Normal", text: "Buy bread", completed: false }