Basic JavaScript - Assignment with a Returned Value

Tell us what’s happening:
What’s the logic here??? I called the function, and put in the argument of 7. And 7 plus 3 is 10, 10 divided by 5 is 2. WHAT IS THE PROBLEM!?!?!?!?!?!?!?!?!?!?!?!?!?!!??

  **Your code so far**
// Setup
let processed = 0;

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

// Only change code below this line
  **Your browser information:**

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

Challenge: Basic JavaScript - Assignment with a Returned Value

Link to the challenge:

Try using round parentheses, when calling functions, not the square ones.

You wrote „ processArg[7];“. Instead write „ processArg(7);“

Also, you can wrap the function call with a console.log to see the returned value of the function. Then, assign the value to the variable processed.

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