Skip to content

Commit 655bc8d

Browse files
committed
post: python pathlib
1 parent 202c8f6 commit 655bc8d

File tree

135 files changed

+8853
-2883
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+8853
-2883
lines changed
File renamed without changes.

content/posts/2025-09-17_morden-js-fundamentals.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
+++
22
date = '2025-09-17T8:00:00+08:00'
33
draft = false
4-
title = 'Morden Javascript Tutorial Part 1- Fundamentals: 06~10'
4+
title = 'Morden Javascript Tutorial Part 2- Fundamentals: 06~10'
55
tags = ['JavaScript']
66
+++
77

@@ -579,6 +579,3 @@ We get these results because:
579579
**Avoid problems**
580580
- Treat any comparison with `undefined/null` except the strict equality `===` with exceptional care.
581581
- Don't use comparisons `>= > < <=` with a variable which may be `null/undefined`, unless you're really sure of what you're doing. If a variable can have these values, check for them separately.
582-
583-
584-
Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,43 @@
11
+++
22
date = '2025-09-21T8:00:00+08:00'
33
draft = true
4-
title = 'Morden Javascript Tutorial Part 1- Fundamentals: 11~15'
4+
title = 'Morden Javascript Tutorial Part 3- Fundamentals: 11~15'
55
tags = ['Javascript']
66
+++
77

8+
## 2.11 Logical operators
9+
There are four logical operators in JavaScript: `||` (ORA), `&&` (AND), `!` (NOT), `??` (Nullish Coalescing 空值合并).
10+
11+
### || OR
12+
```JavaScript
13+
result = a || b
14+
```
15+
There are four logical combinations:
16+
```JavaScript
17+
alter( true || true ); // true
18+
alert( false || true ); // true
19+
alert( true || false ); // true
20+
alert( false || false ); // false
21+
```
22+
If an operand is not a boolean it's converted to be a boolean for the evaluation.
23+
```JavaScript
24+
if (1 || 0) { // works like (true || false)
25+
alter('truthly!');
26+
}
27+
```
28+
29+
#### OR "||" finds the first truthly value
30+
```JavaScript
31+
result = value1 || value2 || value3
32+
```
33+
The OR `||` operator does the following:
34+
- Evaluates operands from left to righit
35+
- For each operand, converts it to boolean. if the result is `true`, stops and returns the original value of that operand
36+
- If all operands are false, returns the last operand.
37+
38+
```JavaScript
39+
alter( 1 || 0 ); // 1
40+
alter( null || 1 ); // 1
41+
alter( null || 0 || 1 ); // 1
42+
alter( undefined || null || 0 ); // 0 (all falsy)
43+
```

content/posts/2025-09-23_docker-container.md

Lines changed: 530 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)