--- id: 5d79253949802f8587c8bbd3 title: Part 118 challengeType: 0 dashedName: part-118 --- # --description-- The `filter` method keeps only the elements of an array that satisfy the function passed to it: ```js [1, 10, 8, 3, 4, 5].filter(x > 3); // [10, 8, 4, 5] ``` Use `filter` to add a function called `even` to `spreadsheetFunctions`, which returns all the even elements of an array, `nums`. # --hints-- See description above for instructions. ```js assert( JSON.stringify(spreadsheetFunctions.even([2, 3, 5, 6, 9, 4])) === '[2,6,4]' && code.includes('filter') ); ``` # --seed-- ## --before-user-code-- ```html Spreadsheet
``` ## --after-user-code-- ```html ``` ## --seed-contents-- ```html ``` # --solutions-- ```html ```