--- id: 5d7925398157757b23730fdd title: Part 121 challengeType: 0 isHidden: true --- ## Description
The `reduce` method can take a second argument (in addition to the function), specifying the initial accumulator value. In this case, the current value starts from index 0 rather than index 1: ```js [1, [1, 2, 3], [3, 4, 5]].reduce((a, x) => a.concat(x), []); // [1, 1, 2, 3, 3, 4, 5] // without the second argument, it first tries 1.concat([1, 2, 3]), but 1 is not an array // now it first tries [].concat(1) which works ``` Add a function `nodups` to `spreadsheetFunctions`, with the value `arr => arr.reduce((a, x) => a.includes(x), [])`.
## Instructions
## Tests
```yml tests: - text: See description above for instructions. testString: assert(/nodups['"]?:arr=>arr\.reduce\(\(a,x\)=>a\.includes\(x\),\[\]\)/.test(code.replace(/\s/g, ""))) ```
## Challenge Seed
```html ```
### Before Test
```html Spreadsheet
```
### After Test
```html ```
## Solution
```html ```