This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.
Smartphone icons created by Freepik - Flaticon
Using a function as a variable:
let text = "The temperature is " + toCelsius(77) + " Celsius."; document.getElementById("demo").innerHTML = text; function toCelsius(fahrenheit) { return (5/9) * (fahrenheit-32); }