Hi, i’am pretty fresh in JavaScript learning, and i can’t get why we need to create new variables all the time ? Here is quick example from sleep debt project
const calculateSleepDebt = () => {
const actualSleepHours = getActualSleepHours();
const idealSleepHours = getIdealSleepHours();
};
Why i can’t just compare one function with another, insted of that i need to create new variables which are equal to function ?
When i’am comparing functions it’s work, so what’s the point?