+ 1
What happens to whatever the return statement returns?!?
2 Respostas
+ 5
the function behaves like the value itself it returns
var a=1;. a is 1
var b=a. b is value of a that is 1;
var c=sqr(3) here c is sqr(3) now the function
returns 9 so whole behaves as 9 9 is the value it returned.
+ 1
function myFunc()
{
...
return 1;
}
var x = myFunc(); // x is 1