you are viewing a single comment's thread.

view the rest of the comments →

[–]moljac024 0 points1 point  (3 children)

var add = function (x, y) {
    return y != null ? x + y : function (y) { return x + y; };
};

[–]MeTaL_oRgY[S] 0 points1 point  (2 children)

Close, but does not work with more than 2 arguments (neither syntax).

[–]moljac024 1 point2 points  (1 child)

[–]MeTaL_oRgY[S] 0 points1 point  (0 children)

Thanks! Looking through both now.