Skip to content

Commit a74619c

Browse files
committed
write function based code
1 parent 5ef7171 commit a74619c

File tree

3 files changed

+61
-22
lines changed

3 files changed

+61
-22
lines changed

Expense Tracker Assignment/index.html

+1-7
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,7 @@ <h1 class="left">
2828
</div>
2929

3030
<h1 class="heading-2">History</h1>
31-
<ul id="transactions">
32-
<!-- <li class="items">
33-
<span class="left"></span>
34-
<span class="right"></span>
35-
<span class="delete fa-solid fa-xmark"></span>
36-
</li> -->
37-
</ul>
31+
<ul id="transactions"></ul>
3832

3933
<div class="new-transaction">
4034
<h1 class="heading-2">Add new transactions</h1>

Expense Tracker Assignment/js/script.js

+6-15
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ submit.addEventListener("click", (e) => {
8686
});
8787

8888
saveExpensesToLocalStorage();
89+
updateTotalExpenses();
90+
clearForm();
8991

9092
// transactions.innerHTML += `
9193
// <li class="items">
@@ -132,20 +134,9 @@ submit.addEventListener("click", (e) => {
132134
// });
133135

134136
// requiredBalance.innerHTML = `₹ ${balance}`;
135-
136-
updateTotalExpenses();
137-
amountValue.value = "";
138-
description.value = "";
139137
});
140138

141-
// function deleteExpenses() {
142-
// deleteExp = document.querySelector(".delete");
143-
144-
// deleteExp.addEventListener("click", (e) => {
145-
// // transactions.innerHTML = "";
146-
147-
// items = document.querySelector(".items");
148-
149-
// transactions.removeChild(items);
150-
// });
151-
// }
139+
function clearForm() {
140+
description.value = "";
141+
amountValue.value = "";
142+
}

README.md

+54
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,38 @@ Project ShowCase :
88

99
![ezgif com-video-to-gif (6)](https://github.com/Lucky-Kashyap/Javascript_Projects/assets/88204554/2854c664-ab22-40e5-a12a-9ba762fb3dc0)
1010

11+
### Completed Web Minor Project
12+
1113
Project 2: product filter page
1214

15+
Features:
16+
17+
- use MOCK product API for getting data
18+
- filter by category you select
19+
1320
Project ShowCase :
1421

1522
![ezgif com-video-to-gif (3)](https://github.com/Lucky-Kashyap/Javascript_Projects/assets/88204554/e38f8755-90c7-4ccd-a11a-b3598639217d)
1623

24+
### Completed task Product filter page
25+
1726
Project 3: News API based project
1827

1928
Project 4: Quiz APP
2029

2130
Project 5: Github User Finder Using JS
2231

32+
Features:
33+
34+
- search any github user
35+
- also show its repositories
36+
2337
Project ShowCase :
2438

2539
![ezgif com-video-to-gif (2)](https://github.com/Lucky-Kashyap/Javascript_Projects/assets/88204554/4426ace7-dff8-457a-afb0-a897568b0aa0)
2640

41+
### Completed Assignment GitHub User Finder Using Vanilla Js
42+
2743
Project 6: Bubble Game
2844

2945
Real World JavaScript Based projects :
@@ -74,6 +90,8 @@ Project ShowCase :
7490

7591
![ezgif com-video-to-gif (7)](https://github.com/Lucky-Kashyap/Javascript_Projects/assets/88204554/8e562e9e-04a9-4d74-98b8-b5d35b13c681)
7692

93+
### Completed JIRA TICKET MANAGEMENT CLONE Using Vanilla JS
94+
7795
Project 8 : Expense Tracker Assignment
7896

7997
Features:
@@ -84,6 +102,42 @@ Features:
84102
- history will be maintain
85103
- Your Expenses has been calculated
86104

105+
Approach:
106+
107+
- blank array
108+
109+
- object= key,value {name:'Book',price:250}
110+
111+
- SHow transactions
112+
113+
array read loop through array
114+
115+
DOM write (ul li)
116+
117+
- add all transactions and show total
118+
119+
- where are the values= array - object - price
120+
121+
loop array obj price aur usme jo values hai usko add krta jaunga
122+
123+
- Remove transactions when clicking the delete button
124+
125+
- delete button par event listener add krna pdega
126+
kis delete button par click ho rha hai yeh pta krna pdega
127+
fir us item ko hamare array me dhund kar delete krna pdega
128+
129+
- update the total after deleting an item
130+
131+
- array ke andar - object price ka total kar rhe hai
132+
jaise hi hum delete krte hai item ko toh hume array ki values ko fir se DOM me dalna pdega
133+
134+
- Everything should be stored in localStorage
135+
136+
- array ko localtorage mein save krna hai
137+
array ko localstorage mein se read krna hai
138+
139+
### Completed Expense Tracker Assignment Using Vanilla JS.
140+
87141
# Upcoming Projects
88142

89143
- Excel Sheet Clone

0 commit comments

Comments
 (0)