Last active
July 5, 2017 13:12
-
-
Save joaocarvalhowd/a5c171775a6e341e79e131b97b836d17 to your computer and use it in GitHub Desktop.
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
function Distancia (metros) { | |
const distancia = parseFloat(metros).toFixed(2) | |
return metros >= 1000 ? `${(distancia / 1000).toFixed(2)} KM` : `${distancia} M` | |
} | |
export default Distancia |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment