Kelvin Weather Task


I keep getting a TypeError: Math.floor is not a function message when running the program. Here is the code:

var name = “kelvin”;
const kelvin = 0;
var name = “celsius”;
const celsius = kelvin - 273;
var name = “fahrenheit”;
let fahrenheit = celsius * (9/5) + 32;
fahrenheit = Math.floor(fahrenheit);
console.log(‘The temperature is ${fahrenheit} degrees fahrenheit.’);
Kelvin = prompt(‘What is the Kelvin temperature today?’);

I am not sure what I am doing wrong any help would be appreciated.


What I think is wrong in the code is that fahrnheit is used in its own variable


also try doing let fahrnheit inside the parenthesis