Created
December 10, 2020 09:23
-
-
Save manishprajapatidev/777dc0a251346c19ccb863282d0fcf94 to your computer and use it in GitHub Desktop.
meterConversion, converts meter to km, and km to meter
This file contains 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
var meterConversion = (function() { | |
var mToKm = function(distance) { | |
return parseFloat(distance / 1000); | |
}; | |
var kmToM = function(distance) { | |
return parseFloat(distance * 1000); | |
}; | |
return { | |
mToKm : mToKm, | |
kmToM : kmToM | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment