# Return

**URL:** <https://forum.kirupa.com/t/return/285110>\
**Category:** flash\
**Created:** [March 27, 2009, 3:28am UTC](https://forum.kirupa.com/t/return/285110 "2009-03-27T03:28:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![greetification](https://avatars.discourse-cdn.com/v4/letter/g/3bc359/32.png) [@greetification](https://forum.kirupa.com/u/greetification)\
**Post date:** [March 27, 2009, 3:28am UTC](https://forum.kirupa.com/t/return/285110/1 "2009-03-27T03:28:59Z")

</div>

\*I think I posted this in the wrong section. Re-posting in the AS3 section.

Hi all, I had a basic programming question: Is it better to data type a function that doesn’t return anything to :void, or should you just use return even if you aren’t returning anything?

```auto

function test(theObj:Object):void {
dataObj = theObj;
}

```

or

```auto

function test(theObj:Object) {
dataObj = theObj;

return
}

```

Is there a difference? What are the advantages/disadvantages or each method?

Thanks!
