TGViewer
JavaScript JavaScript @javascript · 31.1K subscribers
Post #2591 4.04K
CHALLENGE

async function fetchData() {
console.log('1');
return Promise.resolve('data');
}

async function processData() {
console.log('2');
const result = await fetchData();
console.log('3');
return result;
}

console.log('4');
processData().then(() => console.log('5'));
console.log('6');
More from @javascript
  1. Oct 2, 2026Post #3532
  2. Oct 2, 2026CHALLENGE const arr = [1, 2, 3]; const log = []; const result = arr.map((x, i) => { if (i…
  3. Oct 1, 2026Post #3530
  4. Oct 1, 2026CHALLENGE class Counter { #count = 0; static #instances = 0; constructor() { Counter.#inst…
  5. Sep 30, 2026Post #3528
  6. Sep 30, 2026CHALLENGE const message = 'a😀bc'; const codePoints = [...message]; const combined = { raw…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →