# Technical Question

**URL:** https://forum.kirupa.com/t/technical-question/228656
**Category:** flash
**Created:** [June 10, 2007, 5:02am UTC](https://forum.kirupa.com/t/technical-question/228656 "2007-06-10T05:02:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![theonlycarmire](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@theonlycarmire](https://forum.kirupa.com/u/theonlycarmire)
#### Post date: [June 10, 2007, 5:02am UTC](https://forum.kirupa.com/t/technical-question/228656/1 "2007-06-10T05:02:42Z")

</div>

So, just wondering;

If i write a for loop as follows…:

```auto

function pass(){
     trace("pass");
}
for(var i = 0; i<5; i++){
     pass();
}

```

…my understanding is that I have written a function that is carried out five times.

So logically, when I instead write the script like this…:

```auto

for(var i = 0; i<5; i++){
     function pass(){
          trace("pass");
     }
     pass();
}

```

…I have actually written and called this function five different times.

So my question is does this clog down any processing usage in my script? Is it less efficient to write my code in the latter way?
