#JavaScript #project #programming
00:00:00 HTML
00:04:20 CSS
00:10:43 JavaScript
// TEMPERATURE CONVERSION PROGRAM
const textBox = document.getElementById("textBox");
const toFahrenheit = document.getElementById("toFahrenheit");
const toCelsius = document.getElementById("toCelsius");
const result = document.getElementById("result");
let temp;
function convert(){
if(toFahrenheit.checked){
temp = Number(textBox.value);
temp = temp * 9 / 5 + 32;
result.textContent = temp.toFixed(1) + "°F";
}
else if(toCelsius.checked){
temp = Number(textBox.value);
temp = (temp - 32) * (5/9);
result.textContent = temp.toFixed(1) + "°C";
}
else{
result.textContent = "Select a unit";
}
}
On this page of the site you can watch the video online JavaScript TEMPERATURE CONVERSION PROGRAM 🌡️ with a duration of hours minute second in good quality, which was uploaded by the user Bro Code 04 November 2023, share the link with friends and acquaintances, this video has already been watched 40,432 times on youtube and it was liked by 858 viewers. Enjoy your viewing!