multiple return values... like ruby

Brendan Eich brendan at mozilla.com
Thu Jan 3 21:55:51 PST 2013


Brendan Eich wrote:
> function pair(x, y) { return [x, h]; }

s/h/y/ there of course!

> let [x, y] = pair(3,4); 

And Nathan beat me to it -- sorry for not updating mail before replying...

/be


More information about the es-discuss mailing list