Skip to content

Commit f7d2ead

Browse files
committed
Quartz sync: Jun 9, 2025, 6:21 PM
1 parent fb614ec commit f7d2ead

File tree

22 files changed

+421
-199
lines changed

22 files changed

+421
-199
lines changed

content/Computer Science/1 Foundations & Theory/Algorithms/Strongly Connected Component.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
2-
created: 2025/5/07 14:36:09
3-
modified: 2025/5/07 14:36:16
2+
description:
3+
created: 2025-05-18
4+
modified: 2025-06-09
45
aliases:
56
- scc
67
- 강한 연결 요소
78
---
9+
810
- 방향 그래프에서, 모든 정점 쌍 (u, v)에 대해 u → v와 v → u가 모두 존재하는 정점들의 최대 집합
911
- 1 → 2 → 3 → 1
1012
- 4 → 5 → 6 → 4
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
description:
3+
aliases:
4+
created: 2025-06-09
5+
modified: 2025-06-09
6+
---
7+
8+
- arguments
9+
- 함수에 전달된 모든 인자(arguments)를 담고 있다
10+
- 함수의 파라미터 개수와 상관없이 접근할 수 있다
11+
- 유사 배열 객체
12+
- map(), forEach() 같은 메서드는 없음
13+
- 화살표 함수에서는 없다
14+
-
15+
```js
16+
function func1(a, b, c) {
17+
console.log(arguments[0]); // 1
18+
console.log(arguments[1]); // 2
19+
console.log(arguments[2]); // 3
20+
}
21+
22+
func1(1, 2, 3);
23+
```
24+
- ...args
25+
- 함수 호출 시 넘겨진 모든 인자를 배열로 모아줌
26+
- 나머지 매개변수(rest parameter)
27+
- 실제 배열 객체
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- async/await
2+
- try/catch로 감싸기
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
description:
3+
aliases:
4+
created: 2025-06-09
5+
modified: 2025-06-09
6+
---
7+
8+
- 선언 방법
9+
- prototype
10+
- `new` syntax (construct function)
11+
- ES6 `class` syntax
12+
- Prototypical Inheritance - 프로토타입을 사용한 상속
13+
- `Class, contructor.. ` 구문은 syntatic sugar (구문적 편의)
14+
- 내부적으로 프로토타입 구문으로 처리
15+
```js
16+
function Vacation(destination, length) {
17+
this.destination = destination
18+
this.length = length
19+
}
20+
21+
Vacation.prototype.print = function() {
22+
console.log(this.destination + " will take " + this.length + " days")
23+
}
24+
25+
var maui = new Vacation("Maui", 7)
26+
27+
maui.print()
28+
29+
```
30+
- 오늘날 [[React|리액트]]는 클래스를 멀리하고, 함수를 사용해 컴포넌트 구성
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
- Primitive
2+
- types
3+
- number
4+
- string
5+
- boolean
6+
- null
7+
- undefined
8+
- symbol
9+
- Bigint
10+
- 불변성
11+
- stack area
12+
- Reference
13+
- types
14+
- object
15+
- array
16+
- function
17+
- RegExp,
18+
- Set
19+
- Map
20+
- 가변성
21+
- heap area
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
- Deep copy
3+
- 객체의 모든 레벨(depth)에 대해 복사
4+
- `JSON.parse()`
5+
- 성능상 문제
6+
- 순환 참조나, 특정 구조 복사 불가능
7+
- 재귀함수
8+
- `immer.js`, `lodash` library
9+
- `json.parse()`의 문제 해결
10+
-
11+
```js
12+
import { produce } form 'immer';
13+
14+
let a = {
15+
more: {
16+
gender: "male"
17+
}
18+
}
19+
20+
let b = produce(a, draft => {
21+
draft.more.gender = "female";
22+
})
23+
24+
console.log(a === b) // false
25+
console.log(a.more.gender)// male
26+
console.log(b.more.gender)// female
27+
```
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
- `const {x, y} = test`
2+
- `import { ReactNode as RN } from 'react';`
3+
-
4+
```js
5+
const regularPerson = {
6+
firstname: "",
7+
lastname: "",
8+
spouse: {
9+
firstname: "",
10+
lastname: ""
11+
}
12+
};
13+
14+
// 구조분해
15+
const lordify = ({spouse: { firstname } }) => {
16+
console.log(`${firstname}`);
17+
}
18+
19+
lordify(regularPerson);
20+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
description:
3+
aliases:
4+
created: 2025-06-09
5+
modified: 2025-06-09
6+
---
7+
8+
- construct
9+
- declaration
10+
- expression
11+
- arrow function
12+
- 화살표 함수는 자체적인 this를 가지지 않는다
13+
- 선언된 스코프(문맥)에 this가 있다면, 그 값을 캡처(closure)하여 사용한다.
14+
- method
15+
- IIFE (Immediately Invoked Function Expression)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description:
3+
aliases:
4+
created: 2025-06-09
5+
modified: 2025-06-09
6+
---
7+
8+
- 호이스팅은 “선언”만 끌어올려짐, “초기화”는 아니다
9+
- var는 undefined가 되지만 let/const는 접근 자체가 불가능
10+
- ![[Scope#^27f6eb]]
11+
- ![[Scope#^365b67]]
12+
- 코드 블록 내에서만 적용
13+
- Lexical Variable Scoping (구문적인 변수 영역 규칙)
14+
- 함수 선언은 완전히 호이스팅됨, 함수 표현식은 그렇지 않음

content/Computer Science/5 Software Development/Programming Language/JavaScript/JavaScript.md

Lines changed: 0 additions & 197 deletions
This file was deleted.

0 commit comments

Comments
 (0)