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.
Your solution only accounts for the first 2 functions in the array, it could be more. Additionally, if the array of functions has 0 or 1 items, then it will throw an exception.
One of the sample tests:
How you call your function in VSCode:
You were just told not to post solution code in the discourse without using the Spoiler flag.
Well, apparently not. It's a weird statement to make. If you need help, you can drop by the Discord and ask for it.
Please mark your post as having spoiler content next time. Your function should return the result instead of printing it to the console.
Almost every kata if not actually every kata on CodeWars has random tests. Pointing that out in the description seems pointless. Cheers!