# Help in random function

**URL:** <https://forum.kirupa.com/t/help-in-random-function/321349>\
**Category:** flash\
**Created:** [April 17, 2011, 5:56pm UTC](https://forum.kirupa.com/t/help-in-random-function/321349 "2011-04-17T17:56:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![essa2002135](https://avatars.discourse-cdn.com/v4/letter/e/a5b964/32.png) [@essa2002135](https://forum.kirupa.com/u/essa2002135)\
**Post date:** [April 17, 2011, 5:56pm UTC](https://forum.kirupa.com/t/help-in-random-function/321349/1 "2011-04-17T17:56:44Z")

</div>

i want to make random number between 1 to 10  
without repate numbet twice or more

i use this function to make random

function getRandomNumber(min:Number, max:Number):Number  
{  
var randomNumber:Number = Math.round(Math.random() \* (max - min) + min);  
return randomNumber;  
}

getRandomNumber(1, 10);

please help  
thank you
