강의

멘토링

커뮤니티

Inflearn Community Q&A

4dallove7405's profile image
4dallove7405

asked

Node and React series that you can learn by following - Basic lecture

Node React Basics Lecture #7 BodyParser & PostMan & Membership Registration Function

res.json({success: flase, arr}) 의 대괄호와 두 개의 인자에 대한 질문

Written on

·

207

0

안녕하세요, 앞서 좋은 콘텐츠 올려주심에 감사드립니다.

다름이 아니라, if(err) return res.json({success:flase, err}) 부분에서 json을 다시 보낼 때 대괄호를 쓰는 이유와 success:flase,  arr 두 개의 인자가 들어가는지 궁금합니다! 

nodejsreact

Answer 1

0

Sounghyun Jeon님의 프로필 이미지
Sounghyun Jeon
Questioner

추가적으로 user.save((err,doc) 부분에서 두 개의 인자는 User 모델을 생성할 때 자체적으로 저장되어 있는 객체인가요?

4dallove7405's profile image
4dallove7405

asked

Ask a question