Skip to content

Instantly share code, notes, and snippets.

@faustoct1
Created August 6, 2022 19:50
Show Gist options
  • Save faustoct1/901c67796b2e490233b47dace7bda477 to your computer and use it in GitHub Desktop.
Save faustoct1/901c67796b2e490233b47dace7bda477 to your computer and use it in GitHub Desktop.
Classe helper com funções estáticas em js
class Helper {
static getHelloWorldSync = () => {
return "Hello World Sync"
}
static getHelloWorldAsync = async () => {
return "Hello World Async"
}
}
const test = async () => {
console.log( Helper.getHelloWorldSync() )
console.log( await Helper.getHelloWorldAsync())
}
(async () => { test() })()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment