I expect my code to output “true” or “false”, but instead, it outputs an array. I’m actually quite happy with the array result, because it did everything up to line 54. However, the code after that, where I try to make the numbers add up and check if they’re divisible by 10, is not working.
Any feedback or tips would be appreciated!
(p.s.: I have reviewed the other posts about this project, but there seem to be all sorts of unique ways of getting stuck on this project.)
on line 54.
Since modified is an array, the function returns that array.
Take this line out to continue to the code afterward.
Oh woooow!!! That’s fantastic! Thank you!
BTW, I found one more mistake in my own code. On line 47, it should say “let i = 0;” (rather than 1). Now the correct items are multiplied by 2 and a valid card number came back “true”, as it should.
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.