> For the complete documentation index, see [llms.txt](https://toktokhan.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://toktokhan.gitbook.io/docs/onborading/growing-up/console.log-testing/challenge.md).

# Challenge

## Stack 모듈 구현과 테스트 코드 작성해보기

아래의 요구사항을 충족하는 stack.ts 와 stack.test.ts 를 작성해주세요.

```typescript
class Stack {
  // push(item) : 해당 item을 Stack의 top에 삽입
  // pop():top에 있는 item을 삭제하고 해당 item을 반환, item 이 없을 경우 error 을 throw
  // peek():Stack의 top에 있는 item을 삭제하지않고 해당 item을 반환
  // get isEmpty():Stack이 비어있으면 true를 반환 그렇지않으면 false를 반환
  // get size()
}
```
