[fCC Staff] Javascript Spreadsheet 34

Contributors and staff. Just wanted to bring this to your attention.

Bare in mind there has been an update and some people will have entirely different instructions for this step.

Instructions
In your evalFormula, declare an idToText arrow function which takes an id parameter.

Your idToText function should return the result of calling .find() on the cells array with a callback function that takes an cell parameter and returns cell.id === id.

Directions don’t match up with the solution all that much, imo. (cells => cells.id === id) is a single parameter/implicit return is it not? cells isn’t the parameter, the entire syntax is the parameter, right? Since this is the first time I can recall we’ve done something like this, maybe explain it better?

this is a function where cells is the parameter (but you are asked to use cell), and cells.id === id is the returned value

the function is also passed as argument (callback functioN) to the find method

For anyone struggling on this step I found that if your logic seems correct the problem may be with your call back functions. Reanalyze your code and check to see if you are using implicit returns as it wants this but doesn’t specify in the instructions. ie not saying function=(p)=>{return x} but saying function=(p)=>x

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