Orientation, Overview of Web Development
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
const internProfile = {
|
||||
firstName: "Rupesh",
|
||||
role: "Web Development Intern",
|
||||
tasksCompleted: 6,
|
||||
|
||||
updateTasks() {
|
||||
this.tasksCompleted++;
|
||||
return `Task Update:\n${this.firstName} has completed a new task!\nTotal Tasks: ${this.tasksCompleted}`;
|
||||
}
|
||||
};
|
||||
|
||||
const getWelcomeMessage = (name, role) => {
|
||||
return `Welcome to the Dashboard!\nName: ${name}\nRole: ${role}`;
|
||||
};
|
||||
|
||||
const checkGoal = (completed, goal = 10) => {
|
||||
const remaining = goal - completed;
|
||||
return `Progress Report:\nCompleted: ${completed}\nTarget: ${goal}\nRemaining: ${remaining} tasks to reach goal.`;
|
||||
};
|
||||
|
||||
const welcome = getWelcomeMessage(internProfile.firstName, internProfile.role);
|
||||
|
||||
alert(welcome);
|
||||
|
||||
const updateStatus = internProfile.updateTasks();
|
||||
alert(updateStatus);
|
||||
|
||||
const progress = checkGoal(internProfile.tasksCompleted);
|
||||
alert(progress);
|
||||
Reference in New Issue
Block a user