Basic JavaScript (48/111) | Passing Values to Functions with Arguments | freeCodeCamp

preview_player
Показать описание
Basic JavaScript (48/111) | Passing Values to Functions with Arguments | freeCodeCamp

Basic JavaScript: Passing Values to Functions with Arguments
Parameters are variables that act as placeholders for the values that are to be input to a function when it is called. When a function is defined, it is typically defined along with one or more parameters. The actual values that are input (or "passed") into a function when it is called are known as arguments.

Here is a function with two parameters, param1 and param2:

function testFun(param1, param2) {
}
Then we can call testFun: testFun("Hello", "World"); We have passed two arguments, "Hello" and "World". Inside the function, param1 will equal "Hello" and param2 will equal "World". Note that you could call testFun again with different arguments and the parameters would take on the value of the new arguments.
Рекомендации по теме
Комментарии
Автор

Great, thank u, made me pass the test.

djla
Автор

Great that finally someone made a youtube which gave me success in passing the test.
But I don't understand why the exercise ask for 2 functions with Argument that didn't work.

akifedar
Автор

thanks bro if you could explain would be more appreciated.

bazyn
Автор

Thanks for uploading these even though your view count may not be high, you stay consistent. Respect👊

williamdennis
join shbcf.ru