Open
Conversation
- await MissionUtils.Console.readLineAsync()
1. 빈값일 경우 ERROR 2. 에러값(null, undefined)일 경우 ERROR 3. 영어이름(a-z A-Z)과 콤마(,)만 입력 가능하며 이외 값은 ERROR 4. 콤마(,)가 먼저 입력될 경우 ERROR 5. 마지막 자리에 콤마(,)가 입력될 경우 ERROR 6. 5글자 이상 넘어가는 이름이 포함되어 있다면 ERROR
- await MissionUtils.Console.readLineAsync()
1. 빈값일 경우 ERROR 2. 에러값(NaN) or 숫자가 아닌 값일 경우 ERROR 3. 과도하게 큰숫자 방지 (숫자 20 초과 시 ERROR)
1. carNames 배열을 객체배열로 만들어주기 2. tryNumber에 따라 진행될 for문 만들어주기 3. 만들어진 객채배열을 map함수에 넣기 4. MissionUtils.Random.pickNumberInRange(0, 9) 사용하여 랜덤숫자 뽑기 5. if문으로 뽑은 랜덤숫자가 4보다 크면 해당 객체배열이 forward 할 수 있도록 forwardNum값 1 증가시키기 6. carNames 변수에 값 racingGame 결과 Update. 7. 매시도마다 결과값 dashe 형태로 Console.print 출력.
1. 객체배열에서 가장 높은 forwardNum을 가진 값이 무엇인지 찾기 (Math.max) 2. 가장 높은 forwardNum값을 가진 객체배열만 필터링 (Array.prototype.filter( )) 3. 필터링된 객체배열에서 carName만 추출하여 배열 만들면서 이름만 추출하기. 4. 최종 우승자 Console.print 출력.
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.
No description provided.