Callback 콜백이란
콜백이란 매개변수로 쓰여지는 함수이다.
또한 여러 콜백들이 동시(synchronous)에 불러지기도 하며 따로따로(asynchronous) 불러지기도 한다.
.then() 을 사용하여 따로따로(asynchronous) 순서 좋게 콜백을 사용할 수도 있다.
.then()은 Promise
synchronous
asynchronous
Promise (참고 : Promise란 (tistory.com))와 함께 쓰이며 .then()함수를 쓴다.
참고링크
JavaScript Callbacks (w3schools.com)
JavaScript Callbacks
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
www.w3schools.com
Callback function - MDN Web Docs Glossary: Definitions of Web-related terms | MDN (mozilla.org)
Callback function - MDN Web Docs Glossary: Definitions of Web-related terms | MDN
A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action.
developer.mozilla.org