Skip to content

Commit e9cb685

Browse files
committed
Push Method with UUID Generation
1 parent 1212a4a commit e9cb685

37 files changed

+76
-10817
lines changed

5project/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Push Method with UUID Generation
2+
3+
###### Summary for this project
4+
###### Purpose: Showcase JavaScript code manages a to-do list.
5+
6+
**Link to work:** [Push Method with UUID Generation](https://arduino731.github.io/JavaScript-Algorithms-and-Data-Structures/5project/)
7+
8+
Your JavaScript code manages a to-do list, adding new tasks while ensuring that users enter valid text. It includes the following key features:
9+
10+
1. Push Method with UUID Generation:
11+
12+
+ Each new to-do item gets a unique identifier using uuidv4(), a function that generates a 128-bit unique identifier.
13+
+ New tasks are added to the todos array with push(), including an animated property for UI effects.
14+
15+
2. Error Handling with Animation:
16+
17+
+ If the input is empty, an error message appears (fadeIn effect).
18+
+ Once the user adds a valid entry, the error message disappears (fadeOut effect with a delay of 600ms).
19+
20+
3. Form Submission Handling:
21+
22+
+ Prevents default form behavior using e.preventDefault().
23+
+ Validates the input field before adding a new task.
24+
+ Clears the input field after a successful submission.
25+
+ Calls render(todos) to update the UI.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

day17/todo.js renamed to 5project/todo.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ document.querySelector('#new-todo').addEventListener('submit', (e) => {
2323
completed: false,
2424
animated: true
2525
})
26+
console.log(todos)
2627
render(todos); // refresh function list and add new todo
2728
// saveTodos(todos) will be save and store data
2829
e.target.elements.text.value = '';

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
1313
| 01 | [JavaScript Select Menu: Changing Background with Switch and DOM Manipulation](https://github.com/arduino731/JavaScript-Algorithms-and-Data-Structures/tree/master/1project) | [Live Demo](https://arduino731.github.io/JavaScript-Algorithms-and-Data-Structures/1project/) |
1414
| 02 | [Form Input Text Wave](https://github.com/arduino731/JavaScript-Algorithms-and-Data-Structures/tree/master/2project) | [Live Demo](https://arduino731.github.io/JavaScript-Algorithms-and-Data-Structures/2project/) |
1515
| 03 | [Animation Paws](https://github.com/arduino731/JavaScript-Algorithms-and-Data-Structures/tree/master/3project) | [Live Demo](https://arduino731.github.io/JavaScript-Algorithms-and-Data-Structures/3project/) |
16+
| 04 | [Animated Countdown and Change Background](https://github.com/arduino731/JavaScript-Algorithms-and-Data-Structures/tree/master/4project) | [Live Demo](https://arduino731.github.io/JavaScript-Algorithms-and-Data-Structures/4project/) |
1617

1718

1819

@@ -90,10 +91,3 @@ Day 16
9091

9192
**Link to Work**: [Todo List](https://arduino731.github.io/100daysofcode/day16/index.html)
9293

93-
Day 17
94-
95-
**Today's Progress**: Basically, I am using flexbox
96-
97-
**Thoughts**:
98-
99-
**Link to Work**: [Todo List](https://arduino731.github.io/100daysofcode/day17/index.html)

0 commit comments

Comments
 (0)