Code Looks Correct But Not Passing


I am new here, hopefully I can make some contributions here in the future

on the " smallest common multiple" challenge in the intermediate algorithym section

I have submitted the following code, however it is failing for “smallestCommons([23, 18]) should return 6056820.”

I have slightly edited it so you can see the output on the page


The output should show an error about a potential infinite loop. To fix it just add // noprotect above your code.

Note: only add it if you are sure that there is no infinite loop.

1 Like

thanks Ben, I have added the parameter and now it passes