Basic javascript stuck

Tell us what’s happening:
Why is there processed = 0; I can’t understand what is the need of processed variable

Your code so far


// Setup
var processed = 0;

function processArg(num) {
return (num + 3) / 5;
}

// Only change code below this line
console.log(processArg(7));

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36.

Challenge: Assignment with a Returned Value

Link to the challenge:

Hello @mudassirikram21. The instruction says:

Call the processArg function with an argument of 7 and assign its return value to the variable processed .

The lesson is teaching you how to assign a value to a variable declared using var keyword.

1 Like

This challenge wants you to assign the functions return value to the variable processed.So the processed variable is initially set to 0.
you can also say var processed;
both declarations will work fine.
If you wanna store something you need a var

1 Like