Give it a try!

Reply to this note

Please Login to reply.

Discussion

I'll go back at it, less code is better code for sure.

Thanks for the encouragement !

You can do it! 馃挭

Put 2 parameters in the first loop?

Backing up a second, I need some clarification. Will addFibs() be called more than once? Or will it be called only once?

Called once, with the numberOfFibs parameter specifing how many iterations of the first for loop.

OK, in that case, what happens if you just delete the outer for-loop? That is, what if you start right off with the of statement for length===0?

Oh yeah I see that now ! The step by step procedure I was sticking to got in my own way! Yeah , that code is utterly redundant.

馃挭