TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Anonymous recursion in 6 lines of Javascript

1 pointsby arnemartover 14 years ago

1 comment

lhorieover 14 years ago
Seems like a somewhat convoluted way of doing this:<p><pre><code> alert(function rec(i) { return i === 0 ? 1 : i * rec(i - 1); }(4));//24 alert(typeof rec);//undefined</code></pre>