Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const newPromise = new Promise((resolve, reject)=>{
- setTimeout(()=>{resolve('changed')}, 3000)
- }).then((data)=>{
- console.log(data)
- return 'last changed'
- }).then((data)=>{
- console.log(data) // 'changed'
- })
Add Comment
Please, Sign In to add comment