# Loop Loops?

**URL:** https://forum.kirupa.com/t/loop-loops/314430
**Category:** flash
**Created:** [September 28, 2010, 1:47pm UTC](https://forum.kirupa.com/t/loop-loops/314430 "2010-09-28T13:47:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Uli](https://avatars.discourse-cdn.com/v4/letter/u/ccd318/32.png) [@Uli](https://forum.kirupa.com/u/Uli)
#### Post date: [September 28, 2010, 1:47pm UTC](https://forum.kirupa.com/t/loop-loops/314430/1 "2010-09-28T13:47:42Z")

</div>

Hello!

This is a weird concept i know but there is something i was wondering if possible…

Say i look for some variable using a multi level loops such as

```auto
for(var i = 0 ; i < something ; i++){
for(var j = 0 ; j < something*.length ; j++){
for(var k = 0 ; k < something*[j].length ; k++){
...
 

```

Now would it be possible to tell it a depth? For instance, pass to a function that i want to look at something using i, j, k which makes a depth of 3, without having to hardcode 3 loops and could be used for X loops? Let’s also consider that it would be used browsing into multiple dimensions array. Possible??
