Hello,

so i was trying to solve the lcm javascript challenge; however, my code seemed to be very inefficient and i got an error. i got an infinite loop.

i finally found this snippet of code. but i didn’t how the first line works. in other words, i didn’t understand the syntax of the first line.

thanks

```
const gcd = (a, b) => a ? gcd(b % a, a) : b;
const lcm = (a, b) => a * b / gcd(a, b);
//Then use reduce on given array of integers:
[1, 2, 3, 4, 5].reduce(lcm); // Returns 60
```