Forked from Corey B3nn's Pen Temperature.
Forked from Corey B3nn's Pen Temperature.
Forked from Corey B3nn's Pen Temperature.
A Pen by kawayne johnson on CodePen.
/* | |
Forumula for converting Celcius to Fahrenheight | |
ºF = ºC * 1.8 + 32.00 | |
Forumula for converting Fahrenheight to Celcius | |
°C = (°F - 32) * .55 | |
The following function converts Celcius to Kelvin | |
°K = °C + 273.15 | |
*/ | |
// 1. Create the variable "degreesInCelsius" and set it to the number 35 | |
var degreesInCelsius=35; | |
// 2. Create a variable "degreesInFahrenheight" | |
var degreesInFahrenheight; | |
// 3. Convert "degreesInCelsius" to Fahrenheight using the formula and save it in "degreesInFahrenheight" | |
degreesInFahrenheight=degreesInCelsius * 1.8+32.00; | |
// 4. Log the value of "degreesInFahrenheight" | |
console.log(degreesInFahrenheight); | |
// 5. Convert "degreesInFahrenheight" back to Celcius using the formula and save it in "degreesInCelsius" | |
degreesInCelsius=(degreesInFahrenheight -32)*.55; | |
// 6. Log the value of "degreesInCelsius" | |
console.log(degreesInCelsius); | |
// 7. Convert "degreesInCelsius" to Kelvin using the formula and save it in "degreesInKelvin" | |
var degreesInKelvin = degreesInCelsius+ 273.15; | |
// 8. Log the value of "degreesInKelvin" | |
console.log(degreesInKelvin); |
Forked from Corey B3nn's Pen Temperature.
Forked from Corey B3nn's Pen Temperature.
Forked from Corey B3nn's Pen Temperature.
A Pen by kawayne johnson on CodePen.