Created
August 6, 2022 19:50
-
-
Save faustoct1/901c67796b2e490233b47dace7bda477 to your computer and use it in GitHub Desktop.
Classe helper com funções estáticas em js
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
| 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