Skip to content

Instantly share code, notes, and snippets.

@azunyuuuuuuu
Created November 29, 2025 20:43
Show Gist options
  • Select an option

  • Save azunyuuuuuuu/5ed62941590f5767a2ac480984bfb50b to your computer and use it in GitHub Desktop.

Select an option

Save azunyuuuuuuu/5ed62941590f5767a2ac480984bfb50b to your computer and use it in GitHub Desktop.
some javascript/typescript things
const listFormatter = new Intl.ListFormat('de', {
style: 'long',
type: 'conjunction',
});
const items = ['apples', 'bananas', 'oranges'];
listFormatter.format(items);
// 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