Quotes help make search much faster. Example: "Practice Makes Perfect"

Thursday, December 15, 2016

Codefights leastFactorial(n)


//sample solution
function leastFactorial(n) {
    var temp = 1;
    for(i=2;i<=n;i++){
        temp = i * temp;
        if(temp>=n){
            break;
        }
    }
    return temp;
}

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts