stockoveslow javascript

Solutions on MaxInterview for stockoveslow javascript by the best coders in the world

showing results for - "stockoveslow javascript"
Giulia
12 May 2020
1function sum() {
2    var retval = 0;
3    for (var i = 0, len = arguments.length; i < len; ++i) {
4        retval += arguments[i];
5    }
6    return retval;
7}
8
9sum(1, 2, 3) // returns 6