Last active
September 10, 2017 03:50
-
-
Save georgeportillo/cf994c98b83b7ece6d294a5fe48abf3c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function init() { | |
// Ask user for input, store in userKilometers. | |
let userKilometers = display('How many kilometers to convert?') | |
// Get amount of miles from the amount of kilometers, store in convertedMiles. | |
let convertedMiles = milesTotal(userKilometers); | |
// Display the amount of miles. | |
display('You have driven ${convertedMiles} in total!') | |
} | |
function milesTotal(userKilometers) | |
// The main and only worry of this function is to processMiles. | |
return userKilometers * (0.6214); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment