Project: Kelvin Weather

Here's my final project!

// This is a reminder that 'const' is like 'var' but it's a value that can NOT be changed!!!
const kelvin = 293;

// Celcius is 273 degrees less than Kelvin, so lets set a 'const' for that:
const celcius = kelvin - 273;

// We're going to establish fahrenheit with "let" because it's value will soon be rounded.
let fahrenheit = celcius * (9/5) + 32;

//In order to round this value DOWN we use math.floor:
fahrenheit = Math.floor(fahrenheit);

console.log(`The temperature is ${fahrenheit} degrees Fahrenheit.`);

Last updated