Question from the Javascript test

Fix the following Javascript function:

Hard

Considering the following function:

function sum() {
    return arguments.reduce(function(total, nb) {
        return total + nb;
    }, '');
}

What will happen if we execute the following expression?

sum(1, 2, 3, 4);

Author: AdrienStatus: Published(Update)Question passed 58 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!