**Tell us what’s happening:**

I dont understand the way functions are used in this snippet. An anonymous function is assigned to sum. But, why does it return a function with the same name? can’t it just be

const sum = function(x, y, z) {

rest of the function

}

**Your code so far**

```
const sum = (function() {
"use strict";
return function sum(x, y, z) {
const args = [ x, y, z ];
return args.reduce((a, b) => a + b, 0);
};
})();
console.log(sum(1, 2, 3)); // 6
```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15`

.

**Link to the challenge:**

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/use-the-rest-operator-with-function-parameters