0

I dont get this return thing, the desciption "it returns the values from the function" makes no sense to me

this code does the exact same : function myFunction(a, b) { document.write (a * b); } var x = myFunction(5, 6);

8th Mar 2016, 12:51 PM
Miroslav
2 Antworten
+ 1
i think i got it , seemthe code i gave you ? using document.write in the function , it is executed whenever the function is called upon, while using return , it basically lets you "return" or in other words use the function to define another function or variable
8th Mar 2016, 12:57 PM
Miroslav