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.

Harmony Rest Parameters - Implementation

1 pointsby adam_freidinabout 14 years ago
function ___args() { var caller = ___args.caller; return Array.prototype.slice.call(caller.arguments, caller.length); };<p>function show(a,b) { return ___args(); }<p>alert(show(1,2,3,4,5).join(',')) // alert("3,4,5")

1 comment

adam_freidinabout 14 years ago
<a href="http://brendaneich.com/2011/01/harmony-of-my-dreams/" rel="nofollow">http://brendaneich.com/2011/01/harmony-of-my-dreams/</a>