function below should generate an error message stating that the function does not return a value


function factorial(n : Num) : Num {
var x = 1;
while(n > 0) {
x = x * n;
n = n - 1;
}
// return x;
}

Submitted by Eelco Visser on 6 November 2010 at 11:20

On 9 November 2010 at 21:29 Zef Hemel commented:

Fixed.


On 9 November 2010 at 21:29 Zef Hemel closed this issue.

Log in to post comments