Return storation


#1

Hi, can anyone help. I don’t know where is the storage for return. The result after being returned will come back to celcius or multiplyByNineFifths?
Capture


#2

looking at the math:

https://www.rapidtables.com/convert/temperature/how-celsius-to-fahrenheit.html

it should come back as farenheith, but you have broken down the math over two functions.


#3

Can you elaborate more on return. When a result is returned in a function, where will it be stored?


#4

return is literally what it says, the function handing something back:

const example = () => {
    return "hello world"
}

// store returned result in x variable
x = example()
console.log(x)

in your case, it isn’t stored anywhere within the program, given you only log it to the console.

Well, running programs are stored within the RAM of computer, so clearly its somewhere, but you don’t store it in a variable or anywhere else in your program to access the values alter.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.