Skip to content
Snippets Groups Projects
Commit 3b72c0cf authored by Andrej Rasevic's avatar Andrej Rasevic
Browse files

updating newFetch example

parent 1cff14c0
No related branches found
No related tags found
No related merge requests found
...@@ -32,15 +32,41 @@ ...@@ -32,15 +32,41 @@
}) })
} }
let prom = new Promise((resolve, reject) => {
resolve('I am running in the initial tick')
})
new Promise((resolve, reject) => {
resolve('testing a theory')
}).then(message => {
console.log(message)
}).then((value) => {
console.log('showing interleaveing')
})
let result = newFetch(data) let result = newFetch(data)
newFetch(data) newFetch(data)
.then(result => { .then(result => {
console.log('printing from newFetch') setTimeout(() => {
console.log('printing from newFetch')}
, 1000)
console.log(result) console.log(result)
})
.then(() => {
console.log('always will grint before "printing from newFetch" ')
}) })
.catch(err => console.error(err)) .catch(err => console.error(err))
console.log('at the bottom of the script')
prom
.then((message) => {
console.log(message)
return "this will be wrapped"
})
.then(message => {
console.log(message)
})
</script> </script>
</body> </body>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment