Code quality: slice and splice

Hi, according to Slice and Splice

my code proposal is different than in the given answer. I flatted the object instead of looping each value to an array.

Does my proposal is bad?
To see the result, please click run.

Thanks!

Since the exercise doesn’t mention you have to use one specific way, as long as you pass the tests you should be fine. It’s not bad.