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

Sunday, December 9, 2012

Codecademy: Codeyear Now you try


//sample solution


function factorial(n) {
if(n<0){
console.log("Invalid argument. Negative numbers not allowed.");
return;
} else if(n===0){
return 1;
} else{
return n*factorial(n-1);
}
}

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts