Pairwise programming challenge - Free code camp
My only comments would be stylistic so may be more a matter of opinion. Am open to any counter comments.

Whitespace

All your code is bunched together and is not as easy to read as it could be.

Single Statement if braces

It is often beneficial and consistent to always have braces on if and other blocks even if there is only a single statement. It's easy to introduce undesirable functionality if you come back to the code later and comment/add lines e.g.

if(someValue)
    //doThis();
alwaysDoThis();


Shorthand arithmetic

returnValue = returnValue + innerCounter + outerCounter;


can be shortened to

returnValue += innerCounter + outerCounter;