--- id: 5d7925398157757b23730fdd title: Part 121 challengeType: 0 dashedName: part-121 --- # --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), [])`. # --hints-- See description above for instructions. ```js assert( /nodups['"]?:arr=>arr\.reduce\(\(a,x\)=>a\.includes\(x\),\[\]\)/.test( code.replace(/\s/g, '') ) ); ``` # --seed-- ## --before-user-code-- ```html