-
Notifications
You must be signed in to change notification settings - Fork 0
Udemy/Ts/section2/28 #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 작성한 커밋입니다.
Github에서 작성한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Closed
1 task
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.
✍Udemy/Ts/section2/28
🔥KeyWord
📝Description
addAndHandle
함수를test
라는 변수에 초기 값을 할당하고 해당 변수를 log로 찍어보면undefined
가 나오는 것을 확인할 수 있다. 이전에도 언급했지만 함수의 반환 값이 void이며 return값을 지정하지 않으면 이와 같은 결과가 도출 된다.addAndHandle
의 반환되는 리터럴 타입은number
이다. 타입을 지정하지 않았기 때문에 암묵적으로 result의 타입을 끌고와서number
로 타입이 지정된다. 따라서 함수 타입을 지정하거나 return값을 지정해주면undefined
가 아닌 정상적인 코드가 출력 될 것이다.📌Summary