Learn Functional Programming by Building a Spreadsheet - Step 97

Tell us what’s happening:

I don’t know what I’m doing wrong

Error messages are as follows:

// running tests
3. Your even function should take a nums parameter.
5. Your even function should return the result of calling the .filter() method on nums.
6. You should pass a reference to your isEven() function as the callback for the .filter() method.

The code:
spreadsheetFunctions.even(nums) => nums.filter(isEven)

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

const spreadsheetFunctions = {
  sum,
  average,
  median,
}
spreadsheetFunctions.even = (nums) => nums.filter(isEven)

// User Editable Region

Your browser information:

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

Challenge Information:

Learn Functional Programming by Building a Spreadsheet - Step 97

Hi @dreyes61

Add an even property to your spreadsheetFunctions .

Since the spreadsheetFunctions object is declared using a const keyword, you need to update the object directly.

Happy coding