Stuck with this code and the number Fahrenheit and newton. doesn't come up in my output. Please help


The temperature is {fahrenheit} degrees Fahrenheit. The temperature is {newton} degrees Newton

My code is

// current temperature in kelvin

const kelvin = 0;

// Converting kelvin to celsius

const celsius = kelvin - 273;

// convert celsius to fahrenheit

let fahrenheit = celsius * (9/5) + 32;

//round down fahrenheit

fahrenheit = Math.floor(fahrenheit);

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

let newton = celsius * (33/100);

newton = Math.floor(newton);

console.log(‘The temperature is ${newton} degrees Newton.’);

Can you please let me know what is wrong with my code? Thanks

Hi @byterunner52352
Welcome to the forum!
If you format your code according to this guideline it will be much easier to spot syntax errors.
One syntax error I see here is not using backticks for string literals:

1 Like