Question from the Javascript test

Archived

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: Jean-marie CléryStatus: Archived(New question!)Question passed 1400 times
1
Community Evaluations
developer avatar
Vincent Cotro
25/07/2023
Intéressant cette question !