Skip to content

Commit 3b22d21

Browse files
committed
log
1 parent 06b96b4 commit 3b22d21

3 files changed

Lines changed: 48 additions & 1 deletion

File tree

archive.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ All my devlog entries, neatly organized.
1111
---
1212

1313
## 📅 2025 Logs
14+
- [2025-11-21 — Devlog #45]({{site.baseurl}}/logs/2025-11-21/)
1415
- [2025-11-18 — Devlog #44]({{site.baseurl}}/logs/2025-11-18/)
1516
- [2025-11-17 — Devlog #43]({{site.baseurl}}/logs/2025-11-17/)
1617
- [2025-11-16 — Devlog #42]({{site.baseurl}}/logs/2025-11-16/)

logs/2025-11-18/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ permalink: /logs/2025-11-18/
2323

2424
---
2525

26-
[← Previous]({{site.baseurl}}/logs/2025-11-17/)
26+
[← Previous]({{site.baseurl}}/logs/2025-11-17/) | [Next →]({{site.baseurl}}/logs/2025-11-21/)

logs/2025-11-21/index.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
layout: default
3+
permalink: /logs/2025-11-21/
4+
---
5+
6+
# Devlog - 2025-11-21
7+
8+
## 🚀 What I Did
9+
10+
- Problems on codewars.
11+
12+
## 🧠 What I Learned
13+
14+
### Reduce()
15+
16+
```javascript
17+
array.reduce((accumulator, currentValue) => {
18+
// logic
19+
}, initialValue)
20+
```
21+
22+
- `accumulator` - Holds the running total or result.
23+
- `currentValue` - The current item in the array during the loop.
24+
- `initialValue` - What the accumulator starts with.
25+
26+
```javascript
27+
const arr = [1, 2, 3];
28+
29+
const sum = arr.reduce((acc, curr) => {
30+
return acc + curr;
31+
}, 0);
32+
33+
console.log(sum); // 6
34+
```
35+
36+
- Works for numbers, strings, objects, arrays — anything.
37+
- Replaces many loops.
38+
- Very flexible.
39+
40+
## 🔥 What's Next
41+
42+
- Lab projects on FCC.
43+
44+
---
45+
46+
[← Previous]({{site.baseurl}}/logs/2025-11-18/)

0 commit comments

Comments
 (0)