Skip to content

Instantly share code, notes, and snippets.

@codecademydev

codecademydev/app.js Secret

Created Nov 16, 2019
Embed
What would you like to do?
Codecademy export
//Current temperature in kelvin degrees.
const kelvin = 0;
//converting kelvin to Celsius.
const celsius = kelvin - 273;
//Convert celsius to Fahrenheit.
let fahrenheit = celsius * (9/5) + 32;
//Rounding down fahrenheit.
fahrenheit = Math.floor(fahrenheit);
console.log(`The temperature ${fahrenheit} degrees fahrenheit.`);
let Newton = celsius * (33/100);
Newton = Math.floor(Newton);
console.log(`The temperature ${Newton} degrees Newton.`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment