📔
Codenewb
  • Codenewb
  • [Change Log]
  • C#
    • Pluralsight
      • C Sharp from Scratch
      • Practice exercises
  • Javascript
    • Codeacademy
      • Getting Started with JavaScript
      • Project: Kelvin Weather
      • Project: Dog Years
      • JavaScript version history
      • Conditional Statements
    • Pluralsight
      • Practice exercises
        • HelloWorld.cs
        • HelloWorld2.cs
        • HelloWorld3.cs
  • Powershell
    • Pluralsight
      • Notebook
    • Powershell in a Month of Lunches
  • Python
    • Codeacademy
      • Learn Python 3
      • Practice exercises
        • Basic hello world
        • My name is Inigo Montoya!
        • I would walk 500 miles
    • Pluralsight
      • Python Getting Started
Powered by GitBook
On this page

Was this helpful?

  1. Javascript
  2. Codeacademy

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.`);
PreviousGetting Started with JavaScriptNextProject: Dog Years

Last updated 5 years ago

Was this helpful?