question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Reference error: Fahrenheit not defined" shows up before starting challenge

See original GitHub issue

Challenge Convert Celsius to Fahrenheit has an issue. User Agent is: Mozilla/5.0 (X11; CrOS x86_64 7978.74.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.103 Safari/537.36. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:


function convertToF(celsius) {
  // Only change code below this line
  var a=32;
  var b=9/5;
  var c=30;

  var d= a + b * c;


  // Only change code above this line
  return fahrenheit;
}

// Change the inputs below to test your code
convertToF(30);

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
texas2010commented, Nov 10, 2016

@nellee24 Please do not post your solution on here. You could help people at FreeCodeCamp Chat Room or Forum. GitHub Issues are for reporting bugs on the website only.

Happy Coding!

1reaction
ArmantHitchcockcommented, Aug 2, 2016

I believe the code is incomplete: function convertToF(celsius) { var fahrenheit;

NB: var fahrenheit isn’t assigned to the parameter “celsius” of the above function, and as the instruction below states the the student shouldn’t edit it thus the function won’t work

// Only change code below this line

// Only change code above this line return fahrenheit; }

<hr>

This is my example:

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

// Change the inputs below to test your code convertToF(30);

Read more comments on GitHub >

github_iconTop Results From Across the Web

Convert Celsius to Fahrenheit - Celsius Not Defined
Hey everyone, It would be great if someone has an idea why I keep getting this error message: “ReferenceError: celcius is not defined”....
Read more >
A simple Javascript function not working (converting ...
A simple Javascript function not working (converting Fahrenheit to Celsius) · It fails because the return statement exits the function - it never ......
Read more >
Creating functions - Programming with R
Let's start by defining a function convert_fahr_to_kelvin that converts temperatures from Fahrenheit to Kelvin:
Read more >
Python Exercise: Convert temperatures to and from celsius ...
Python Exercises, Practice and Solution: Write a Python program to convert temperatures to and from celsius, fahrenheit.
Read more >
Objectives - Mathematics
Input – temperature in Celsius; Output – temperature in Fahrenheit ... Before we start coding, let's write a rough draft of the program...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found