Created
July 13, 2022 23:15
-
-
Save faustoct1/e32a538ba5d0aa948df48a9e1513fdda to your computer and use it in GitHub Desktop.
Exemplo de execução função callback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const callback = () => { | |
console.log('executou callback') | |
} | |
const exec = async (cb) => { | |
console.log('exec começo') | |
cb() | |
console.log('exec fim') | |
} | |
(async () => { | |
exec(callback) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment