Table of Contents
show
Example: 1A
Write a JavaScript to convert temperatures to and from celsius, Fahrenheit.
Script
let temperature = 23;
let F = (temperature * 9) / 5 + 32;
console.log("Fahrenheit=" + F);
let C = ((F - 32) * 5) / 9;
console.log("celcius=" + C);
Output
Views: 15