Skip to content

Commit 9f43042

Browse files
committed
log
1 parent 556898f commit 9f43042

3 files changed

Lines changed: 84 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-12-03 — Devlog #53]({{site.baseurl}}/logs/2025-12-03/)
1415
- [2025-12-02 — Devlog #52]({{site.baseurl}}/logs/2025-12-02/)
1516
- [2025-11-28 — Devlog #51]({{site.baseurl}}/logs/2025-11-28/)
1617
- [2025-11-27 — Devlog #50]({{site.baseurl}}/logs/2025-11-27/)

logs/2025-12-02/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ console.log(x) // outputs 3
4444

4545
---
4646

47-
[← Previous]({{site.baseurl}}/logs/2025-11-28/)
47+
[← Previous]({{site.baseurl}}/logs/2025-11-28/) | [Next →]({{site.baseurl}}/logs/2025-12-03/)

logs/2025-12-03/index.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
layout: default
3+
permalink: /logs/2025-12-03/
4+
---
5+
6+
# Devlog - 2025-12-03
7+
8+
## 🚀 What I Did
9+
10+
- Title case conversion using for loops and maps.
11+
- Inventory Management.
12+
- Codewars.
13+
14+
## 🧠 What I Learned
15+
16+
- Boolean - converter function.
17+
- boolean - data type.
18+
19+
```javascript
20+
typeof true // "boolean"
21+
typeof false // "boolean"
22+
23+
Boolean(10) // true
24+
Boolean(0) // false
25+
Boolean("hi") // true
26+
Boolean("") // false
27+
Boolean(null) // false
28+
Boolean(true) // true
29+
```
30+
31+
### Class
32+
33+
| Use Case | Better Choice |
34+
| ------------------- | ------------- |
35+
| Object blueprints |`class` |
36+
| Utilities / helpers |`function` |
37+
| Modern projects |`class` |
38+
| Legacy code |`function` |
39+
40+
- class is just a blueprint for creating objects.
41+
42+
```javascript
43+
class Car {
44+
constructor(name, speed) {
45+
this.name = name;
46+
this.speed = speed;
47+
}
48+
}
49+
50+
const car1 = new Car("BMW", 120);
51+
const car2 = new Car("Audi", 150);
52+
```
53+
54+
- constructor runs automatically when you create a new object.
55+
- properties - variables that belong to the object.
56+
- methods - function inside a class.
57+
- this - means this current object.
58+
59+
| Use Case | Use Class? |
60+
| ---------------------- | ---------- |
61+
| Many similar objects ||
62+
| Game characters ||
63+
| API models ||
64+
| Data structures ||
65+
| One small object ||
66+
| Simple helper function ||
67+
68+
- `module` - provides a powerful way to organize and structure js.
69+
70+
```javascript
71+
72+
import anyName from './module.js';
73+
```
74+
75+
## 🔥 What's Next
76+
77+
- mini projects.
78+
- theory.
79+
80+
---
81+
82+
[← Previous]({{site.baseurl}}/logs/2025-12-02/)

0 commit comments

Comments
 (0)