Javascript-Kelvin Weather

Need help with my first Javascript exercise. I followed the video instructions to do this project , but it won’t render the correct answer

//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 is {fahrenheit} degrees fahrenheit.'); let Newton = celsius * (33/100); Newton = Math.floor(Newton); console.log('The temperature is {Newton} degrees Newton.’);

Hey @enikardie!

Remember that you must use backticks when you use the new ES6 string interpolation syntax.

Also, would you please send the link to the exercise?

3 Likes

i think that you are using the wrong apostrophe… you are using (’) that is for text like quots(") and you should use (` ), but I dont remenber the name, “right accent?”… perhaps is one solution…

and i usually take a mistake with caps… I don’t remember this exercise, but be carefully with this. I spend a lot of time searching a mistake and not defined variables, and the answer is a capital letter…

2 Likes

Hey @paratablet9648384657.

It’s called a backtick, and yes, that is what his code is missing. It should work fine once he fixes this.

definitely true, you want to be careful with this, but in the situation he presented, there was no problem.

:grimacing: sorry, sometimes I don’t translate correctly, and didn’t see that you answered

1 Like

@stevencopeland. Thank you for your help!! I made the changes and it worked. I wa using the apostrophe instead of the backtick.

@paratablet9648384657. Thank you!!

1 Like
2 Likes