0
Why it is returning NaN?
I'm making a Fahrenheit to Celsius converter. But my code is returning NaN. What am I doing wrong? https://code.sololearn.com/Wmyr8bdFy1P3/?ref=app
3 Respuestas
+ 1
try this
var fahrenheit = document.getElementById('fahrenheit').value;
there is no need to give double Quotation
for example :
var fa = "document.getElementById('fahrenheit').value"
output: document.getElementById('fahrenheit').value;
var fa = document.getElementById('fahrenheit').value
output: (Entered value will be the Output )
+ 2
Remove the double quotes from the variable fahrenheit declaration.
0
Thanks guys. It really helps 😊