Created
November 29, 2025 20:43
-
-
Save azunyuuuuuuu/5ed62941590f5767a2ac480984bfb50b to your computer and use it in GitHub Desktop.
some javascript/typescript things
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 listFormatter = new Intl.ListFormat('de', { | |
| style: 'long', | |
| type: 'conjunction', | |
| }); | |
| const items = ['apples', 'bananas', 'oranges']; | |
| listFormatter.format(items); |
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 { promise, resolve, reject } = Promise.withResolvers(); | |
| function wait(ms) { | |
| const { promise, resolve } = Promise.withResolvers(); | |
| setTimeout(resolve, ms); | |
| return promise; | |
| } | |
| console.log("start!"); | |
| await wait(1000); | |
| console.log("1000ms passed"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment