Objects, arrays, and transactions
입문~30 분0/4 단계
Move from single values to a ledger
An object groups the fields that belong to one transaction. An array holds many transactions. Array methods let you transform that real structure instead of copying totals by hand.
The included rows are explicitly marked as practice data. Your job is to render them and derive income, expenses, and balance from the array.
안내
1
Use filter to select income transactions.
힌트: Filter where item.type === 'income'.
어디에 작성하나요?
// Use map to render rows and reduce to calculate totals.8번째 줄에 작성하세요 — 그 주석 아래, 이미 추가한 코드 다음입니다.
2
Use reduce to total amountAgorot.
3
Render transaction rows with map and join.
4
Show income, expenses, and balance in #summary.
내 코드
html
1
2
3
4
5
6
7
8
ViBot과 함께 바이브로 만들기무료 메시지 0 / 12개
이 단계에서 만들고 싶은 것을 설명해 주시면 코드를 작성해 드릴게요 — 그다음 적용을 클릭하면 에디터에 바로 들어갑니다. 이 단계: Use filter to select income transactions.
실시간 미리보기
실시간 미리보기