Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I am creating an accumulator function for a practice problem that is supposed to filter odd elements in a numbers array. My code is passing
I am creating an accumulator function for a practice problem that is supposed to filter odd elements in a numbers array. My code is passing every test except for one (i have copied the tests below the picture). I cannot figure out why the second test is not passing, please look at my code and help me understand what I am doing wrong. Thank you.
it should return an array it should return an array with the odd elements from the passed in array Error: expected [ 1 ] to deeply equal [ 1, 3, 5 ] it should return an array if there are no odd numbers it should return an array if given an empty array
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started