JS functions for newbie

Hello!

How does the getFahrenheit function know that the return value of multiplyByNineFifths is the celsius argument?
Taken from codecademy intro course.

function multiplyByNineFifths(number) {
    return number * (9 / 5);
    // Returns 27
};

// Celsius is value of 27
function getFahrenheit(celsius) {
    return multiplyByNineFifths(celsius) + 32;
    // Returns 59
};

// Calling getFahrenheit, which looks back to multiplyByNineFifths
console.log(getFahrenheit(15));
// Prints 59
Was this page helpful?