New course! Every coder should learn Generative AI!
Try a free lesson+ 2
if( n == 1 )
{
In here n will always be 1, therefore return n and return 1 are the same thing.
}
+ 1
The return will only done,
if n == 1
So it's the same. In this case "n" is always equal 1.
You can return "n" or "1". It makes no difference.