Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object persons = {......};
- foreach (person in persons) {
- print="person";
- }
- array persons = [....];
- foreach (person in persons) {
- print="person";
- }
- # If you need to get the specific index for whatever reason though....
- indexWhereFound = null;
- for (int i = 0; i < person.length; i++) {
- # Lets say you want to keep track of where exactly a certain person was found...that you can't exactly do on a foreach.
- if (person[i].isMexican === true) {
- indexWhereFound = i;
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement