Skip to content

Instantly share code, notes, and snippets.

@oguzhancvdr
Created October 22, 2022 19:53
Show Gist options
  • Save oguzhancvdr/493ea0bd9a76aacb727724da1b20d5df to your computer and use it in GitHub Desktop.
Save oguzhancvdr/493ea0bd9a76aacb727724da1b20d5df to your computer and use it in GitHub Desktop.
const fahrenheitToCelsius = (fahrenheit) => (fahrenheit - 32) * 5/9;
fahrenheitToCelsius(50);
// 10
const celsiusToFahrenheit = (celsius) => celsius * 9/5 + 32;
celsiusToFahrenheit(100)
// 212
@oguzhancvdr
Copy link
Author

Convert Fahrenheit to Celsius and vice versa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment