Reach destination
Expected Behaviour
You're on a train to your friend's, and you need to send your friend a text to let them know when you'll be arriving.
Assuming you know the train's distance from your destination in miles, and you know how fast the train is going in miles per hour, you'll use a reachDestination
function to output a string:
The time should be rounded up to the nearest 0.5 hours (half an hour).
reachDestination
has two parameters: distance
and speed
- it is expected that only arguments of a Number type will be passed.
E.g.
Would output:
Because 44 / 10
is 4.4
, which we round up to the nearest 0.5 to equal 4.5
.
Assertion
- returns string with estimated time of arrival
Run tests
Don't see this on your diy-kata repo?
Your repo probably isn't up to date with the remote. You can bring it up to date by adding the original repo back as a remote, and pulling from it with a rebase (a rebase takes new commits from the remote and slots them around yours):