What is wrong here? 7 and 9 refused to add up

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

function functionWithArgs(para1, para2){console.log(1 + 2);}
functionWithArgs(1, 2);
function functionWithArg(para7, para9){console.log(7 + 9);}
functionWithArg(7, 9);

Your browser information:

User Agent is: Mozilla/5.0 (Linux; U; Android 10; Nokia 3.4 Build/QKQ1.200719.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/81.0.4044.138 Mobile Safari/537.36 OPR/56.1.2254.57583

Challenge: Passing Values to Functions with Arguments

Link to the challenge:

You need to use the function parameters inside the function, do not hardcode the numbers in there

Lines 1 and 2 panned out… But 3 and 4 didn’t. They are the same.

You need to define one single function, use the parameters/variables inside it so that it is reusable and be able to do both sums with a single function

Read again on what a function is, what “arguments” are and how to use them.

I’ve solved it… Was looking at the wrong line🙂

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