rajamourty
New Member
Uncomment //fn in the alg() function and run the code and it will no longer return 0What is causing this error?? can't I call a fuction multiple times inside another fuction definition?? \[code\]<script>function factorial(b){factorial=1;for(b; b > 1; b--){factorial =b*factorial;}return factorial;}function alg(n, k){ fk = factorial(k); //fn=factorial(n);return 0;}</script><body><script>write=alg(5,2);document.write(write);</script>\[/code\]