반응형 콜백함수1 드림코딩 엘리 - 자바스크립트 기초 강의(ES5+) (11편) 비동기 처리의 시작 콜백 이해하기 'use strict'; // JavaScript is synchronous : 자바스크립트는 동기적인 언어다. // Execute the cod block in order after hoisting. // hoisting: var, function declaration 은 맨 위로 선언됨 console.log('1'); setTimeout(() => console.log('2'), 1000); // 1000msc = 1초 console.log('3'); // Synchronous callback function printImmediately(print) { print(); } printImmediately(()=> console.log('hello')); // Asyn.. 2021. 11. 16. 이전 1 다음 반응형