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

[Juyoung03] 프론트엔드 2주차 미션 #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Juyoung03
Copy link

No description provided.

Copy link
Collaborator

@hhhkdev hhhkdev left a comment

Choose a reason for hiding this comment

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

내용 정리에 굉장히 힘써주셧네요! 시험 기간이다보니 뒤에 mission3까지는 힘드셧을거라 생각합니당 시험 끝나고 다 마무리하시고, 올려놓으셨을 때 저 불러주시면 추가로 코멘트 남겨드릴게요 수고하셧습니다~

@@ -0,0 +1,388 @@
# 프론트엔드와 백엔드 소통
Copy link
Collaborator

Choose a reason for hiding this comment

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

전체적으로 내용이 상당히 기네여 수고가 많으셧지만 내용들을 조금더 요약해서 정리하면 어떨까 싶습니다! 나중에 가서 다시 확인할일 있을 때 전문을 다 읽기에는 시간이 오래 걸릴거 같아용

// .then((data) => console.log(data));

async function get(host, path) {
const url = `https://${host}/${path}`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

입력 방식까지 쪼갠게 인상깊네여 물론 이번 경우는 url이 명시되어 있었지만 실제 코드를 짜다보면 일부 url은 쪼갤 필요가 있다는걸 느끼게 되실겁니당 언제 어떤 url로 API 요청을 날릴 지를 모르기 떄문이에용


get("jsonplaceholder.typicode.com", "posts")
.then((data) => {
for (let i = 0; i < 100; i++)
Copy link
Collaborator

Choose a reason for hiding this comment

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

물론 해당 사이트를 보면 요소가 100개라는걸 확인할 수 있겠지만, 실제로는 요소가 몇개 있을지 알 수 없는 상황에서 요청하는 경우가 많아요. 따라서 forEach 메소드에 대해서 좀더 알아보시면 좋을거 같아용

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