← Back to Gists

Convert Celsius to Fahrenheit

๐Ÿ“ JavaScript
theresawilliams366
theresawilliams366 · Level 2 ·

This JavaScript snippet converts a Celsius temperature to Fahrenheit using the formula (C × 9/5) + 32.

JavaScript
function celsiusToFahrenheit(celsius) { return (celsius 9/5) + 32;
} const celsius = 25;
const fahrenheit = celsiusToFahrenheit(celsius);
console.log(`${celsius}°C = ${fahrenheit}°F`);

Comments

No comments yet. Start the discussion.