Skip to content

Step2 2#93

Merged
honux77 merged 2 commits intocode-squad:Soorealbutnicefrom
soojinroh:step2-2
Apr 12, 2019
Merged

Step2 2#93
honux77 merged 2 commits intocode-squad:Soorealbutnicefrom
soojinroh:step2-2

Conversation

@soojinroh
Copy link
Copy Markdown

Michelle & 수리 JS STEP2-2 구현

1. Math.pow를 중복해서 호출 사용하던 것을 const{pow} = Math 로 비구조화할당하여 사용하는 것으로 수정하였습니다.
2. 원기둥을 구하는 함수 cylinderArea()에서 원의 넓이를 구하는데 circleArea() 함수를 재사용하는 것으로 수정하였습니다.
1.getArea()함수 구현
2.printExecutionSequence() 함수 구현
3.printExecutionSequence() 에서 함수의 결과까지 같이 출력하도록 수정
let getArea = (func_name, ...args) => {
switch (func_name){
case 'circle':
result = utils.polygon.circle(...args);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오~ 앞의 ...과 뒤의 ... 다 적절한 사용인 듯 합니다 👍

Copy link
Copy Markdown

@honux77 honux77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log에 문자열을 사용했는데, 배열을 이용해서 스택처럼 쌓으면 좋을 것 같아요.
그리고 로그를 기록하는 함수도 별도로 만들면 좋겠네요.
다음 PR에 반영해 주세요. 일단 머지합니다.

@honux77 honux77 merged commit 4210f82 into code-squad:Soorealbutnice Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants