Urgent Help with JS!

Urgent Help with JS!
0.0 0

#1

I put

processArg(7);```

, but I couldn't pass the challenge, and then I don't know what the challenge wants me to do, because is said  `Assign 'processed' to processArg`


```js

// Example
var changed = 0;

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

changed = change(10);

// Setup
var processed = 0;

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

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

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value


#2

Hi @Hackdragon12, you’ve got the right idea. Remember to try to understand what’s happening in the example first, then follow the instructions.

ourSum = sum(5, 12);

Here’s our example. We see multiple things happening here:

  1. We have variable, ourSum, which is being set to something.
  2. The function sum is called with 5 and 12 arguments.
  3. sum returns. Whatever is returned from sum gets set to the variable ourSum

Now for your prompt:

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

Break down the steps in the same way!


#3

Thank you so much!

for(var i = "Love coding"; i <= "not a proffesional yet";i++){ }


#4

Haha love this. Glad you got it! Let us know if you run into more problems.