I solved that task in two ways:
- basic solution according to the task guidelines on branch
basicSolution
- extended solution on branch
extendedSolution
Please kindly check the code of both solutions, and thank you for your time!
Firstly i solved that task with a task guidelines on branch basicSolution. Then i decided to try to improve that function a bit in case the arguments passed to the function contain different data. Then i have also tested that function to see how it works.
- Output of the solution