--- id: 5d79253949802f8587c8bbd3 title: Part 118 challengeType: 0 isHidden: true --- ## 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`.
## Instructions
## Tests
```yml tests: - text: See description above for instructions. testString: assert(JSON.stringify(spreadsheetFunctions.even([2,3,5,6,9,4])) === "[2,6,4]" && code.includes("filter")); ```
## Challenge Seed
```html ```
### Before Test
```html Spreadsheet
```
### After Test
```html ```
## Solution
```html ```