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);
2 Answers
+ 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