Skip to content

Instantly share code, notes, and snippets.

@devansvd
Created December 28, 2017 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devansvd/89a6ab17aa48976a08b960a9e19677cc to your computer and use it in GitHub Desktop.
Save devansvd/89a6ab17aa48976a08b960a9e19677cc to your computer and use it in GitHub Desktop.
Recursive loop syntax
//Recursive Loop Syntax
function recursiveLoop(data, inputlength) {
if (inputlength >= 0) {
var currentdata = data[inputlength];
inputlength = inputlength - 1;
recursiveLoop(data,inputlength);
}
else{
//Response here
}
}
inputlength = data.length - 1
recursiveLoop(data,inputlength);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment