비동기처리1 비동기 처리의 시작 콜백 이해하기 callback.js 'use strict' //Synchronous callback function printImmediately(print){ print(); } //Asynchronous callback function printWithDelay(print, timeout) { setTimeout(print, timeout); } //JavaScript is synchronouse. //Execute the code block by orger after hoisting. //hoisting: var, funcition declaration console.log('1'); setTimeout(() => console.log('2'), 1000); //console.log('2'); console.lo.. 2021. 12. 7. 이전 1 다음