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

Wednesday, December 5, 2012

Codecademy: Codeyear Building 'substring' with Recursion (Part 1)


//sample solution


var substring = function(all, start, end){
//Recursive case
while(start<end){
console.log(all[start]);
start++;
}
//Base case
if(start >= end){
console.log(all[start]);
}
};

//test
substring("word",0,3);

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts