Skip to content
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

[토의] Symbol.Iterable 의 용도에 대하여 #14

Open
jessi68 opened this issue Aug 31, 2021 · 0 comments
Open

[토의] Symbol.Iterable 의 용도에 대하여 #14

jessi68 opened this issue Aug 31, 2021 · 0 comments
Labels
question Further information is requested

Comments

@jessi68
Copy link
Collaborator

jessi68 commented Aug 31, 2021

질문

iterable 객체의 용도에 대하여

상세내용

iterable 객체는 destruct, for ... of 문, 스프레드 문 등의 문법 등을 사용할 수 있는 객체 입니다. 이러한 특성은 일반 객체에서는 볼 수 없습니다. 그래서 일반 객체를 iterable 한 객체처럼 사용하고 싶을 때에는
변수이름Symbol.iterator 가 반환한 객체를 iterable 객체로 사용할 수가 있습니다.
제 개인적인 생각으로는 iterable 객체의 기능들을 상속 형태로 받으면, 각 객체가 iterable 에 너무 종속되는 경향이 있어
Symbol.Iterator 함수를 사용해 iterable 객체의 특성이 담긴 코드들을 붙였다 뗐다 하는 식으로 사용을 하면
더 자유롭지 않나 싶어서 이 함수가 필요한 것 같습니다.

참고

34 단원

@jessi68 jessi68 added the question Further information is requested label Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant