The number "117" is not generated by the console.log statement.
It's the result of the whole evaluated expression (code).
It's a bit surprising that the code has actually a result value
(it's value of the 's' variable), but Firebug is right in this
case
Honza
On Aug 8, 10:57 am, Len Nguyen <
len.nguyen...@gmail.com> wrote:
> Hi,
>
> There is issue with firebug when using Console to run this code:
>
> for(var i=2; i <= 100; i++){
> var s = 1;
> for(var j = 2; j <= i/2; j++){
> if(i % j == 0) s += j;
> }
> if(i == s){
> console.log(i);
> }
>
> }
>
> It prints 6, 28 and 117. It should be only 6 and 28.
>
> Regards / Len