Skip to content

Instantly share code, notes, and snippets.

@heymonicakay
Last active October 21, 2020 02:25
Show Gist options
  • Save heymonicakay/97d563dca4f0788c09c4afe8f45cd952 to your computer and use it in GitHub Desktop.
Save heymonicakay/97d563dca4f0788c09c4afe8f45cd952 to your computer and use it in GitHub Desktop.
Convert Celsius To Fahrenheit

You are given a variable celsius representing a temperature in Celsius. Use the variable fahrenheit to represent the Fahrenheit temperature equivalent to the given Celsius temperature. Convert the Celsius temperature to Fahrenheit.

const convertToF = (celsius) => {
let fahrenheit = ((celsius * 9) / 5) + 32;
return fahrenheit;
}
console.log(convertToF(20))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment