Tell us what’s happening:
Describe your issue in detail here.
is this code proper?
Your code so far
function functionWithArgs(num1,num2) {
console.log(1+2,7+9);
}
functionWithArgs()
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
.
Challenge: Passing Values to Functions with Arguments
Link to the challenge:
You’re asking if the code looks proper right?
You kind of have a lot going on in your message. Overall it looks okay. ‘functionWithArgs’ is not that great of a funtion name.
If your calling the function at the bottom, dont forget to pass in arguments
Hi @akeemmartin925 !
Welcome to the forum!
You shouldn’t hardcode these numbers here like this
akeemmartin925:
console.log(1+2,7+9);
Your function should work with any two numbers not just the two listed in the test case.
What if I wanted to use 10 & 13 or 20 & 2, or 3 & 4?
Your function wouldn’t work for any of those combinations.
For this challenge, you need to add num1
and num2
in your console.log.
That’s it.
Then when you call the function , make sure to use actual numbers.
Ex.functionWithArgs(1,2)
Hope that makes sense!
yes indeed it does thanks
system
Closed
November 6, 2021, 12:38am
5
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.