I’ve been working on the challenge to get into a bootcamp (as a complete newb) and I hit a bit of a bump
The task is to convert the temperature of 4°C to °F
All versions below work in the developers tool in chrome, however they don’t work on repl.it.
Version 1:
let fahrenheit; //prints nothing on repl.it
let celsius; //works perfect in chrome
function toF(celsius){
fahrenheit =(celsius*1.8)+32;
return fahrenheit;
};
console.log(fahrenheit);
toF(4);
Version 2:
let fahrenheit; //prints nothing on repl.it
let celsius; //works perfect in chrome
const converter = celsius =>{
fahrenheit=(celsius*1.8)+32;
return fahrenheit;
console.log(fahrenheit);
};
converter(4);
Version 3:
let fahrenheit; //prints Nothing on repl.it
let celsius; //works perfect in Chrome
function cToF (celsius){
fahrenheit=(celsius*1.8)+32;
return fahrenheit;
console.log(fahrenheit);
};
cToF(4);
any hints as to why are much appreciated