Skip to content

Commit d2255d5

Browse files
committed
log
1 parent 1a0ee3a commit d2255d5

3 files changed

Lines changed: 90 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-12 — Devlog #41]({{site.baseurl}}/logs/2025-11-12/)
1415
- [2025-11-10 — Devlog #40]({{site.baseurl}}/logs/2025-11-10/)
1516
- [2025-11-08 — Devlog #39]({{site.baseurl}}/logs/2025-11-08/)
1617
- [2025-11-05 — Devlog #38]({{site.baseurl}}/logs/2025-11-05/)

logs/2025-11-10/index.md

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

2424
---
2525

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

logs/2025-11-12/index.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
layout: default
3+
permalink: /logs/2025-11-12/
4+
---
5+
6+
# Devlog - 2025-11-12
7+
8+
## 🚀 What I Did
9+
10+
- Some lab work on boolean and numbers.
11+
12+
## 🧠 What I Learned
13+
14+
### Objects in JS
15+
16+
```javascript
17+
const exampleObject = {
18+
propertyName: value;
19+
}
20+
```
21+
22+
- To access most common is dot notation `objectName.propertyName`.
23+
24+
```javascript
25+
// bracket notation
26+
const person = {
27+
name: "Alice",
28+
age: 30,
29+
city: "New York"
30+
};
31+
32+
console.log(person["name"]); // Alice
33+
console.log(person["age"]); // 30
34+
```
35+
36+
- Functions and object methods are both ways to encapsulate reusable code.
37+
- `Object()` - when you want to create an object wrapper for a primitive value.
38+
- Recipe Tracker.
39+
40+
### JSON
41+
42+
- `JSON` - javascript object notation.
43+
- Is a lightweight data format used for data exchange between servers and web applications.
44+
45+
```javascript
46+
{
47+
"name": "Alice",
48+
"age": 30,
49+
"isStudent": false,
50+
"list of courses": ["Mathematics", "Physics", "Computer Science"]
51+
}
52+
```
53+
54+
- `JSON.stringify()` is used to convert a JavaScript object into a JSON string.
55+
56+
```javascript
57+
const developerObj = {
58+
firstName: "Jessica",
59+
isAwesome: true,
60+
isMusician: true,
61+
country: "USA",
62+
};
63+
64+
// result: {"firstName":"Jessica","country":"USA"}
65+
console.log(JSON.stringify(developerObj, ["firstName", "country"]));
66+
```
67+
68+
- Also accepts an optional parameter called a `replacer`, which can be a function or an array.
69+
- `JSON.parse()` converts a JSON string back into a JavaScript object.
70+
71+
```javascript
72+
const jsonString = '{"name":"John","age":30,"isAdmin":true}';
73+
const userObject = JSON.parse(jsonString);
74+
console.log(userObject);
75+
76+
// Result:
77+
// { name: 'John', age: 30, isAdmin: true }
78+
```
79+
80+
- Optional chaining operator - `?.` is a useful tool in JavaScript that lets you safely access object properties or call methods without worrying whether they exist.
81+
82+
## 🔥 What's Next
83+
84+
- Objects.
85+
86+
---
87+
88+
[← Previous]({{site.baseurl}}/logs/2025-11-10/)

0 commit comments

Comments
 (0)