Can you explain why my code dosnt work please ?! #2750
-
Pls, help me? whats wrong with my code, i have no idea understand why it doesn't work it passes (50% of test) and on other tests catches this error Value is not what was expected I dont, know what should i change
in this kata Combine Objects |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The problem is : the input can have more than 3 objects. |
Beta Was this translation helpful? Give feedback.
-
the function has to be able to accept more than 2 two arguments(2,3,4,5,6,7...).How can you do it?Use "rest" in your arguments to collect them into one array and then you will be able to iterate in the array. |
Beta Was this translation helpful? Give feedback.
-
also remember about reduce method.It's very useful method |
Beta Was this translation helpful? Give feedback.
The problem is : the input can have more than 3 objects.
"Your task is to write a function that takes two or more objects"