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

this is the code i’m using…

```
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 ??

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

this is the code i’m using…

```
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 ??