TGViewer
JavaScript JavaScript @javascript · 31K subscribers
Post #2021 6.6K
CHALLENGE

function mystery(x) {
return (function(y) {
return x + y;
})(x * 2);
}

const result1 = mystery(2);
const result2 = mystery(5);
const result3 = mystery(-1);

console.log(result1, result2, result3);
  • 👍 9
More from @javascript
  1. Oct 10, 2026Post #3550
  2. Oct 10, 2026CHALLENGE async function main() { const settled = await Promise.allSettled([ Promise.resol…
  3. Oct 9, 2026Post #3548
  4. Oct 9, 2026CHALLENGE const a = -7 % 3; const b = 7 % -3; const c = 2 ** 3 ** 2; const d = (2 ** 3) **…
  5. Oct 8, 2026Post #3546
  6. Oct 8, 2026CHALLENGE function tag(strings, ...values) { return strings.raw.join('|') + '::' + values.…
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 →