https://github.com/LRharlekin/is-johnny-making-progress
Fork this repo and then git clone
your forked repo to your computer.
Once you're happy with your solution, git push
and submit a pull request at
https://github.com/LRharlekin/is-johnny-making-progress
.
To train for an upcoming marathon, Johnny goes on long runs each Saturday. He tracks the kilometers he runs each Saturday. If the distance run one Saturday exceeds the distance run the previous Saturday, he calls that a "progress day".
Create a function that takes an array of the amount of kilometers Johnny ran on different Saturdays within a certain period, and returns Johnny's total number of progress days from that period.
progressDays([4, 4, 3, 4]) // returns 1
progressDays([6, 5, 3, 4]) // returns 1
progressDays([10, 11, 12, 9, 10]) // returns 3
To test your solution, run npm install
in the root directory and then run npm test
to run the automated tests.
To submit your solution: Push your changes to your forked repo and submit a PR (pull request) to this repo.