Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. const prom = new Promise(resolve => { resolve('resolved'); });
  2.  
  3. // 여러가지 일을 수행
  4. // 시간지연이 얼마가 되었든 어쨌든 원하는 시점에서
  5.  
  6. prom.then(resolve => { console.log(resolve); });
  7. callback = console.log;
  8. prom.then(callback)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement