# Classes - how to .. return

**URL:** <https://forum.kirupa.com/t/classes-how-to-return/326756>\
**Category:** flash\
**Created:** [January 10, 2012, 1:26pm UTC](https://forum.kirupa.com/t/classes-how-to-return/326756 "2012-01-10T13:26:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [January 10, 2012, 1:26pm UTC](https://forum.kirupa.com/t/classes-how-to-return/326756/1 "2012-01-10T13:26:43Z")

</div>

Hiya - im trying to work out some OOP fundamentals.  
[LEFT]Im stuck with returns - i just dont know quite how to use them - the concept is obvious enough.

So - I create a simple function

```auto
function randomNumber()
{
    var rn:Number = Math.random()*1;
   return rn;
}
randomNumber();

```

whooop I made a random number … it’s returned! - but how do I access it - use it - reference it - know where’s it returned to…\>

I know with this simple problem I could get the result through a manner of ways - but im interested in using return … anyone willing to return some help this way …

thanks[/LEFT]
