re: The challenge to make a shape area calculation in CodeFights (rebrand as CodeSignal) VIEW POST

FULL DISCUSSION
 

I think think there's an even easier solution:

shapeArea = function(n){
    return 1 + (n-1)*4
}

 
 

Yeah, that's exactly the beauty that I talk about code fights. You can learn from other solution.

code of conduct - report abuse