Answers for "using javascript Write a function that takes in a number representing the temperature in Celsius and returns the temperature in Fahrenheit. Write another function that does the opposite (Fereignheit to Celsius)"

4

javascript celcius to farenheit

const celsiusToFahrenheit = celsius => celsius * 9/5 + 32;

const fahrenheitToCelsius = fahrenheit => (fahrenheit - 32) * 5/9;

// Examples
celsiusToFahrenheit(15);    // 59
fahrenheitToCelsius(59);    // 15
Posted by: Guest on July-03-2020

Code answers related to "using javascript Write a function that takes in a number representing the temperature in Celsius and returns the temperature in Fahrenheit. Write another function that does the opposite (Fereignheit to Celsius)"

Code answers related to "Javascript"

Browse Popular Code Answers by Language