How to ignore infinite loop potential?

How to ignore infinite loop potential?
0.0 0

#1

My solution works in repl.it but it takes a bit to get there. How do I turn off infinite loop protections?


#2

figured it out.

//noprotect

At the begining of the solution

Needed this for the least common multiplier one.
If your curious about my solution, here it is. Warning for spoilers.

//noprotect
function smallestCommons(arr) {
	done = false;
	index = Math.max(...arr);
	do {
	    done = true;
	    for(var i = Math.min(...arr); i < Math.max(...arr); i++){
	        if(index % i != 0){
	            console.log(index + ' is not the smallestCommon');
	            done = false;
	            index += Math.max(...arr);
	            break;
	        }
	    }
	} while(!done);
	console.log(index + ' is the smallestCommon');
	return index;
}

smallestCommons([1, 5]);

#3

If you want to challenge yourself, there are efficient enough solutions that you don’t need to turn the protection off.