TGViewer
JavaScript JavaScript @javascript · 31.1K subscribers
Post #3523 593
CHALLENGE

let order = [];
function a() {
try {
return 'try';
} finally {
order.push('a-finally');
return 'a-final-return';
}
}
function b() {
try {
throw new Error('x');
} catch (e) {
order.push('b-catch');
return 'b-catch-return';
} finally {
order.push('b-finally');
}
}
console.log(a(), b(), order.join(','));
More from @javascript
  1. Sep 28, 2026Post #3524
  2. Sep 27, 2026Post #3522
  3. Sep 27, 2026CHALLENGE class Base { value = 10; getValue = () => this.value; constructor() { this.value…
  4. Sep 26, 2026Post #3520
  5. Sep 26, 2026CHALLENGE const obj = { value: 42, getValue() { return this?.value; }, getValueArrow: () =…
  6. Sep 25, 2026Post #3518
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 →