# Random number

**URL:** <https://forum.kirupa.com/t/random-number/200375>\
**Category:** Uncategorized\
**Created:** [September 11, 2006, 7:38pm UTC](https://forum.kirupa.com/t/random-number/200375 "2006-09-11T19:38:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bl4ck1c3](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@bl4ck1c3](https://forum.kirupa.com/u/bl4ck1c3)\
**Post date:** [September 11, 2006, 7:38pm UTC](https://forum.kirupa.com/t/random-number/200375/1 "2006-09-11T19:38:41Z")

</div>

I’m trying to generate a random number, let’s say between 1 and 10

this is the code i’m using…

```auto
Math.ceil(Math.random()*10);

```

it kinda works but the number 0 is also picked…

but i only wanted the numbers [1,2,3,4,5,6,7,8,9,10]

any tip ??
