I think replace is better anyways. Don't need to worry about getting null returned, then have to check for it. null.length doesn't brake your code, because you where not turned a string or array.
If it return 1, I get expected 1 to deeply equal 2.
If it return 2, I get expected 2 to deeply equal 1.
I'm logging the loop, so I know there's only one running.
length thing will not work, example the recipe does not have milk, but the available obj does. And I don't think it would be best practice to assume that wouldn't happen, though I don't know if that is true or not.
I think replace is better anyways. Don't need to worry about getting null returned, then have to check for it. null.length doesn't brake your code, because you where not turned a string or array.
If it return 1, I get expected 1 to deeply equal 2.
If it return 2, I get expected 2 to deeply equal 1.
I'm logging the loop, so I know there's only one running.
This comment is hidden because it contains spoiler information about the solution
Well that killed my code.......
length thing will not work, example the recipe does not have milk, but the available obj does. And I don't think it would be best practice to assume that wouldn't happen, though I don't know if that is true or not.
This is what I want into the comment section hoping to find out. But no one ever answered you.
I don't understand this code, and would like to.
This comment is hidden because it contains spoiler information about the solution