Last active
March 5, 2016 00:03
-
-
Save chipoglesby/f9910a5b3a723cfda3ea to your computer and use it in GitHub Desktop.
This loops over the indices of the first array, and uses that to index into the others.
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
| function loopMultipleArrays() { | |
| var a = ["a","b","c"]; | |
| var b = ["A","B","C"]; | |
| var c = [1,2,3]; | |
| output = ""; | |
| var i; | |
| for (i = 0; i < a.length; i += 1) { | |
| output += a[i] + b[i] + c[i] + "\n"; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment