Convert Celsius to Fahrenheit Whats next?

Tell us what’s happening:

Your code so far

function convertToF(celsius) {
  var fahrenheit;
  // Only change code below this line
  var celsius = (celsius/1.8)+ 32;
   return celsius;
  // Only change code above this line
  return fahrenheit;

// Change the inputs below to test your code


Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36.

Link to the challenge:

The above is not the formula for converting Celsius to Fahrenheit. Also, you should be assigning the formula to the fahrenheit variable instead of the celsius variable. Get rid of return celsius;

var fahrenheit = (celsius * 9/5) + 32;
this is it

how to fix these tasks
convertToF(0) should return a number
convertToF(-30) should return a value of -22
convertToF(-10) should return a value of 14
convertToF(0) should return a value of 32
convertToF(20) should return a value of 68
convertToF(30) should return a value of 86

You do not need the var on the front.

I have no idea, how to fix this!

Please read my original reply to your topic. You are not doing the very last thing I said.

Sorry, I didn’t understand.

Delete return celsius;

Since you want to return the fahrenheit variable, you do not want to return celsius.