Skip to content

Instantly share code, notes, and snippets.

@ardydedase
Created November 30, 2020 12:38
Show Gist options
  • Select an option

  • Save ardydedase/43926fd7ca81b4781fcdab5038c20a5e to your computer and use it in GitHub Desktop.

Select an option

Save ardydedase/43926fd7ca81b4781fcdab5038c20a5e to your computer and use it in GitHub Desktop.
const meterToMile = (x: number): string => `${x * 0.0006213689} mi`
const meterToYard = (x: number): string => `${x * 1.0936132983} yd`
const meterToFoot = (x: number): string => `${x * 3.280839895} ft`
const meterToInch = (x: number): string => `${x * 39.37007874} in`
console.log(meterToMile(1000))
console.log(meterToYard(3))
console.log(meterToFoot(2))
console.log(meterToInch(1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment