Merged
Conversation
crongro
requested changes
Sep 12, 2018
Contributor
crongro
left a comment
There was a problem hiding this comment.
죄송한데 다시 구현을 해주실래요?
document.getElementById쓰지말고,
console.log에서 함수 호출해서 실행되도록 구현하시면 됩니다.
polygonSize.html
Outdated
| <h2>다각형의 넒이 구하기</h2> | ||
| <div id='circle'> | ||
| <h3>원넓이</h3> | ||
| <h>반지름</h> |
Contributor
There was a problem hiding this comment.
h 태그를 잘못썼네요.. h1,h2..이렇게써야함.
crongro
requested changes
Sep 12, 2018
Contributor
crongro
left a comment
There was a problem hiding this comment.
죄송한데 다시 구현을 해주실래요?
document.getElementById쓰지말고,
console.log에서 함수 호출해서 실행되도록 구현하시면 됩니다.
그리고 함수들은 동사+명사로 구현하시는 게 의미를 잘 담는 겁니다.
또한 함수는 인자를 잘 써야 하고요.
이부분도 참고해서 수정해보세요~
crongro
approved these changes
Sep 13, 2018
Contributor
crongro
left a comment
There was a problem hiding this comment.
잘 수정하셨어요.
다음스텝으로 진행하세요.
대신 시작전에 리뷰남긴것 참고해서 수정하시고요~
|
|
||
| function sizeSquare(lowerSide, height) { | ||
| if (lowerSide === undefined || height === undefined) { | ||
| return console.log('인자가 부족합니다.') |
Contributor
There was a problem hiding this comment.
인자의 갯수를 확인하는 것이면,
arguments 갯수를 확인할 수도 있겠네요.
| function sizeSquare(lowerSide, height) { | ||
| if (lowerSide === undefined || height === undefined) { | ||
| return console.log('인자가 부족합니다.') | ||
| } else if (toString.call(lowerSide) != '[object Number]' || toString.call(height) != '[object Number]') { |
Contributor
There was a problem hiding this comment.
else if(여기)
여기에 해당하는 부분을 별도 함수로 한번 만들어볼래요?
여기에 해당하는 코드와 로직이 길면 이를 하위함수로 많이 분리하기도해요.
crongro
pushed a commit
that referenced
this pull request
Sep 14, 2018
* 다각형 넓이 (#29) * index of polygonSize * Full index of html and get area of circle, square, trapezoid, cylinder * restart * add sizeCircle function * add function sizeSquare, add testcode * add function sizeTrapezoid, add test code * add function sizeSylinder, add distinguish test code, add test code * modify by referring to feedback, add function getArea, add function printExecutionSequence * Revise var to const, Change variable name arr -> ExecutionSequenceArray, and Revise PrintExecutionSequence function(revise forEach method to use arrow function), * revise isNum function to use 'for' statement and add typenumberfunction for isNum function * modifiy function sizeCircle to CalcCircleWidth and change inner contents * Modify sizeSquare function to CalcRectWidth and change inner contents * Modify sizeTrapezoid function to calcTrapezoidWidth function and revise inner contents * Modify sizeSylinder functino to calcSylinderWidth function and revise inner context * Modify getArea function to check Number of arguments * Revise little bugs,(add return to calcSylinderWidth, change some upperCase to lowerCase
crongro
added a commit
that referenced
this pull request
Sep 14, 2018
* 1차 다각형넓이구하기 (#32) * 1차 다각형넓이구하기 * 1.함수명 변경 2.숫자판별을 함수가 아닌 개별 함수내의 조건으로 재설정 3.let pi > const pi 4.return 오류 수정 * Step2 (#34) * 다각형 넓이 (#29) * index of polygonSize * Full index of html and get area of circle, square, trapezoid, cylinder * restart * add sizeCircle function * add function sizeSquare, add testcode * add function sizeTrapezoid, add test code * add function sizeSylinder, add distinguish test code, add test code * modify by referring to feedback, add function getArea, add function printExecutionSequence * Revise var to const, Change variable name arr -> ExecutionSequenceArray, and Revise PrintExecutionSequence function(revise forEach method to use arrow function), * revise isNum function to use 'for' statement and add typenumberfunction for isNum function * modifiy function sizeCircle to CalcCircleWidth and change inner contents * Modify sizeSquare function to CalcRectWidth and change inner contents * Modify sizeTrapezoid function to calcTrapezoidWidth function and revise inner contents * Modify sizeSylinder functino to calcSylinderWidth function and revise inner context * Modify getArea function to check Number of arguments * Revise little bugs,(add return to calcSylinderWidth, change some upperCase to lowerCase * Revert "Step2 (#34)" This reverts commit 97ff01e.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HTML에 버튼과 길이 등을 입력할 수 있는 input부분을 만들었습니다.
버튼을 누르면 길이 등을 반영하여 넓이를 구할 수 있게 만들었습니다.
만일 숫자가 아닌 다른 것을 입력한다면 경고창을 띄우도록 만들었습니다.
피드백 부탁드립니다. 감사합니다.