Learn Functional Programming by Building a Spreadsheet - Step 34

Step 34

// Your idToText function currently returns an input element. Update it to return the value of that input element.

js Code:
const evalFormula = (x, cells) => {
const idToText = id => cells.find(cells.id === cells.value)

}

Sorry, your code does not pass. Don’t give up.

You should return the value property of the return value of the .find() method.
// anyone please help me, it took me literally a day , I haven’t solved it

What does the find method return?

hi, bro did you manage to solve this code, am stuck on it.

Youre supposed to update it to the value. So try adding .value add the end of your code

hi Nicholas & @plutoxbe1 I am also ‘stuck’ on step 34!
this is my code:
“const evalFormula = (x, cells) => {
const idToText = id => (cells.find(cell => cell.id === id)).value;
}”
error message: " You should return the value property of the return value of the .find() method."
I have tried so many different solutions, each one fails the fCC test!
here is a screen image

The tests are very fussy - the parameters id and cell should be in parentheses but the outer parentheses in this line should be removed

thank you so :pray: I have spent nearly 2 hours trying to work out why the fCC test was failing my code!
This test is too fussy! “const idToText = id = (cells.find(cell => cell.id === id)).value”
should be accepted.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.