Add Week-01 and Week-02 content
This commit is contained in:
11
Week-03/Day_01/index.html
Normal file
11
Week-03/Day_01/index.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
28
Week-03/Day_01/script.js
Normal file
28
Week-03/Day_01/script.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const internProfile = {
|
||||
firstName: "Rupesh",
|
||||
role: "Web Development Intern",
|
||||
tasksCompleted: 5,
|
||||
|
||||
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