javascript star pattern programs
This forms the external loop.