Question: Algorithm Challenge "Smallest Common Multiple" Solution

I have been struggled with this challenge that I would rather see the solution and learn how others did.
Below solution mentioned that it is using “reduce()” for the block.
I tried to simulate loop from 1 to 5 but I cannot get how it works.
Could anybody explain to me??

  • What I don’t understand : What inside the for loop ; var GCD

Thank you in advance for your time and help!

Continuing the discussion from freeCodeCamp Algorithm Challenge Guide: Smallest Common Multiple:

Easiest way to figure out smallest common multiple is to figure out the greatest common divisor first (GCD).