Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const prom = new Promise(resolve => { resolve('resolved'); });
- // 여러가지 일을 수행
- // 시간지연이 얼마가 되었든 어쨌든 원하는 시점에서
- prom.then(resolve => { console.log(resolve); });
- callback = console.log;
- prom.then(callback)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement