JavaScript Coding Challenge #7

Hello campers!
Let me know what you think about the new article I posted on medium:

Well done!

There’s a further tweak you can do. xy is the same as yx so you don’t need to do that twice.
Let’s take an example with max number of 3. Your loops will perform these multiplications:

3x3
3x2
3x1
2x3 // already done
2x2
2x1
1x3 // already done
1x2 // already done
1x1

You can fix that simply by starting the second loop by j=i:
Doing so I got 7020 iterations. Sweet! :slight_smile:

That’s right @JoolsMcFly! Thanks! :smiley: