I want to set the first least common multiple of 2 number(n1 and n2), but my break statement won't work. I don't want to use a return(which it works). Is there a way to work around this? Thanks.
var firstDayTogether,n1,n2;
for(var i=1;i<12345;i++){
for(var j=1;j<12345;j++){
if((s1*i)==(s2*j)){
firstDayTogether=(s1*i);
break;
}
}
}