Skip to content

Add Tasks list for Day-8 #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions Day8/Task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Day 8: ES6+ Features 🚀

Welcome to Day 8 of our JavaScript workshop! Today, we will dive into some of the powerful features introduced in ES6 and beyond. 🌟

## Learning Objectives 📚

By the end of these activities, you will:
- Understand and use template literals for string interpolation and multi-line strings.
- Apply destructuring to extract values from arrays and objects.
- Utilize spread and rest operators for array manipulation and function arguments.
- Define functions with default parameters.
- Create objects using enhanced object literals, including methods and computed property names.

## Activities 🛠️

This workshop is divided into several activities:

### Activity 1: Template Literals ✨

- [ ] **Task 1:** Use template literals to create a string that includes variables for a person's name and age, and log the string to the console.
- [ ] **Task 2:** Create a multi-line string using template literals and log it to the console.

### Activity 2: Destructuring 🛠️

- [ ] **Task 3:** Use array destructuring to extract the first and second elements from an array of numbers and log them to the console.
- [ ] **Task 4:** Use object destructuring to extract the title and author from a book object and log them to the console.

### Activity 3: Spread and Rest Operators 📌

- [ ] **Task 5:** Use the spread operator to create a new array that includes all elements of an existing array plus additional elements, and log the new array to the console.
- [ ] **Task 6:** Use the rest operator in a function to accept an arbitrary number of arguments, sum them, and return the result.

### Activity 4: Default Parameters 🔧

- [ ] **Task 7:** Write a function that takes two parameters and returns their product, with the second parameter having a default value of 1. Log the result of calling this function with and without the second parameter.

### Activity 5: Enhanced Object Literals ⚙️

- [ ] **Task 8:** Use enhanced object literals to create an object with methods and properties, and log the object to the console.
- [ ] **Task 9:** Create an object with computed property names based on variables and log the object to the console.

## Feature Requests (Optional) 🎨

1. **Template Literals Script:** Write a script that demonstrates the use of template literals to create and log strings with embedded variables and multi-line strings.
2. **Destructuring Script:** Create a script that uses array and object destructuring to extract values and log them.
3. **Spread and Rest Operators Script:** Write a script that demonstrates the use of the spread operator to combine arrays and the rest operator to handle multiple function arguments.
4. **Default Parameters Script:** Create a script that defines a function with default parameters and logs the results of calling it with different arguments.
5. **Enhanced Object Literals Script:** Write a script that uses enhanced object literals to create and log an object with methods and computed property names.