Skip to content

Commit 13ae4bb

Browse files
committed
배열 배운 것 정리 파일
1 parent 50691f6 commit 13ae4bb

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

jiyeeeah/[week1]Array/배열.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
> 이번에는 문제를 풀며 몰랐거나 까먹었다가 이제 다시 알게 된 부분들 위주로 정리해봤습니다.
2+
3+
## 2차원 배열 만들기
4+
5+
```js
6+
const arr = new Array(5).fill(0).map(() => new Array(4));
7+
```
8+
9+
### 📄 REFERENCE
10+
11+
https://joonfluence.tistory.com/508
12+
13+
## 행렬의 곱셈
14+
15+
```js
16+
const r1 = arr1.length;
17+
const c1 = arr1[0].length;
18+
const r2 = arr2.length;
19+
const c2 = arr2[0].length;
20+
// 여기서 c1 === r2이다.
21+
22+
// 결과 배열은 r1 * c2이다.
23+
const answer = new Array(r1).fill(0).map(() => new Array(c2).fill(0));
24+
```

0 commit comments

Comments
 (0)