Hello campers, I’m having a little challenge here. I can’t figure out why my code works perfectly but is unable to pass the test. Please can someone help me out.
March 8, 2022, 6:53am
You are not returning anything from the function.
Ok pardon me I’m just a beginner but i thought the last return statement takes care of it ? Or are you refaring to the two callback functions ?
March 8, 2022, 7:15am
You’re returning the result of
console.log(newArr) which is
To get the same effect, you could console.log on the line before and just return the value.
And inthe future, please don’t post pictures of code. Cut and paste the code and provide a link to the challenge.
Or just console.log the final result with your test code:
console.log(diffArray([1... In some ways that’s a better way to log anyway because you are sure you are logging what the function returns.
Thanks for your input sir. And regarding the picture, that is the only option i have for now because just like i complaint yesterday, i can’t access this forum using my PC and i figured i need to change my OS if i must rectify that. So please pardon me for now.
Please don’t take pictures of the code. Just don’t. It is really hard to read that picture and taking a picture makes it impossible for us to run your code.
September 7, 2022, 2:06am
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.