function functionWithArgs(one, two) {
console.log(one, two);
}
functionWithArgs(one, two);
function functionWithArgs(one, two) {
console.log(one, two);
}
functionWithArgs(one, two);
This isn’t a valid function call because ‘one’ and ‘two’ aren’t variables in this scope. What did the instructions say should happen with this function call?
It says “call the function with two numbers as arguments.” How do I go about that?
Then we can call
testFun
like this:testFun("Hello", "World");
.
This is an example of calling a function with two strings.
function functionWithArgs(one, two) {
console.log(one, two);
}
functionWithArgs(“one”, “two”);
That’s a function call with two strings. What are the actual numbers?
actual? I don’t know but I think it is 3 and 16?
Try it in the code
function functionWithArgs(one, two) {
console.log(one, two);
}
functionWithArgs(“3”, “16”);
Those are still strings
Jeremy now I’m confused.
a string is something like "a"
or 'a'
a number is 1
or 2
etc.
Notice there is no quotes or double quotes.