Created
February 25, 2015 03:07
-
-
Save aguestuser/b0430275cb61ac1a4066 to your computer and use it in GitHub Desktop.
recursive loop (with pdfs)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arr = [1,2,3,4]; | |
function dumbAddOne(arr) { | |
if (arr == []) return []; | |
else return ([1 + arr[0]]) + dumbAddOne(arr.slice(1)); | |
} | |
function findActivty(pdfArr){ | |
if (pdfArr == []) return []; | |
if (/Activity/.test(pdfArr[0])) { | |
doStuf(); | |
} | |
else return findActivity(pdfArray.slice(1)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment