Casa de cambio explainer, money changer explainer


Ya lo termine pero quiero entender. Que son las variantes que estan en los parentesis del function? Y para que sirve el “return”? No entiendo
I have finished it but I want to understand. What are those variables on the parenthesis of the function? And what is the “return” for? I dont understand

Hello! The dollars variable is part of a hidden code that runs before the project does. Go to the money changer explainer to see the additional code.
For your second question, let’s say that you have this code:

function add(num1, num2) {
return num1 + num2
}
console.log(add(8, 2))

Without the return code block, there would be nothing printed. return basically tells the computer what to print when the function is being ran.
Hope this helps!
-Friidays :blush:

2 Likes

Oh thank you so much