You may want to follow the discussion of LCM here
Here’s your solution in everyday language
check each multiple of max for divisibility by all numbers in the range - the multiple is increased if divisibility fails - the number is decremented if divisibility succeeds
this hews well to the definition of LCM as the lowest common multiple
it is a brute force or exhaustive algorithm - it is slow for couple reasons - if the range is large e.g. 2-10 then each multiple has to be checked many times - if the numbers are large like 18-20 then many multiples of max are tried before hitting a common multiple
still it can work iteratively in a loop
but as implemented recursively above it simply will not work for even slightly large numbers because each new multiple increases the recursion depth and javascript quickly runs out of memory after a certain recursion depth