Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Yeah, that's strange... because I just ran my code in browser and it works great
Don't know why it returns different arrays here and in my console...
P.S. And my code works perfectly in Codepen too
Thanks for the answer anyway, I guess I should just skip this kata..
The question is same.
My code returns [ "Tablets", "Music CDs", "Speakers" ].
-Because Speakers goes BEFORE Keyboards.
-In my answer Speakers goes BEFORE keyboards
-This is their ORIGINAL positions.
Why in the world would test expect KEYBOARDS?
So, I have these arguments in my JavaScript function:
products: [ 'Tablets', 'Computer', 'Vacuum Cleaner', 'Mouses', 'Scooter', 'TVs', 'Speakers', 'Keyboards', 'Printer', 'Games', 'Chargers', 'Cell Phones', 'Music CDs', 'Drones' ]
amounts: [ 40, 27, 12, 3, 12, 44, 22, 44, 17, 13, 1, 19, 22, 19 ]
prices: [ 88, 66, 67, 63, 61, 6, 84, 42, 1, 22, 68, 72, 94, 24 ]
And the test expected [ 'Tablets', 'Music CDs', 'Keyboards' ] to deeply equal [ 'Tablets', 'Music CDs', 'Speakers' ]
Keyboards and Speakers has the same revenue: 1848, and you requested order them according to their original positions.
Speakers goes before Keyboards in input parameters. So wtf does this thing want?
This comment is hidden because it contains spoiler information about the solution