"Reference error: Fahrenheit not defined" shows up before starting challenge
See original GitHub issueChallenge 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:
- Created 7 years ago
- Comments:15 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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!
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);