Open preira opened 5 years ago
@preira is right, even leaving the for loop empty does passes the test . At first my solution passed then it got me into thinking just only making the function async how does it is acceptable... @timoxley indeed there is something wrong with the validation of the program.
Seeing the same thing. Using a debugger, I can see it doesn't even enter my function, it just runs the solution.
After finding the async_loops folder in the functional-javascript-workshop directory of the npm global installation and trying to run it, I found that runner.custom ran twice, the first time the f assigned to fx was a function we wrote, and the second time it was a function in solution.js, so I Made a monitor and only assigned the value the first time.
Edit exercise.js in this directory:
var fx
=>var fxWrap = new Proxy({ fx:'' },{ set:function(obj,props,val){ if(props=='fx'){ if(obj[props]==''){ obj[props] = val return true } } return true } })
And add the call object in front of the corresponding fx below.
fx = f
=>fxWrap.fx = f
fx.call(fx, ids, load, done)
=>fxWrap.fx.call(fxWrap.fx, ids, load, done)
run command function-javascript verify ./file.js.It worked for me.
My English isn't very good, so I used translation software and hope I spoke clearly enough
The async_loops solution is not being validated.