![javascript - I've created a variable which is supposed to generate random number between 0 and 4 but it is only showing the output as 1 - Stack Overflow javascript - I've created a variable which is supposed to generate random number between 0 and 4 but it is only showing the output as 1 - Stack Overflow](https://i.stack.imgur.com/SAhyF.png)
javascript - I've created a variable which is supposed to generate random number between 0 and 4 but it is only showing the output as 1 - Stack Overflow
![Shripal Soni on X: "Javascript Tip 💡 Easily generate random integer numbers in a range using this one-line function 👇 https://t.co/85zgTskyRh" / X Shripal Soni on X: "Javascript Tip 💡 Easily generate random integer numbers in a range using this one-line function 👇 https://t.co/85zgTskyRh" / X](https://pbs.twimg.com/media/Fs7tgZ7XwAM79FW.jpg)
Shripal Soni on X: "Javascript Tip 💡 Easily generate random integer numbers in a range using this one-line function 👇 https://t.co/85zgTskyRh" / X
![Playing with array in javascript using Math.random() | by Javascript Jeep🚙💨 | Frontend Weekly | Medium Playing with array in javascript using Math.random() | by Javascript Jeep🚙💨 | Frontend Weekly | Medium](https://miro.medium.com/v2/resize:fit:802/1*Y3tM2GCPbpY7gthqH7rduQ.png)
Playing with array in javascript using Math.random() | by Javascript Jeep🚙💨 | Frontend Weekly | Medium
![Playing with array in javascript using Math.random() | by Javascript Jeep🚙💨 | Frontend Weekly | Medium Playing with array in javascript using Math.random() | by Javascript Jeep🚙💨 | Frontend Weekly | Medium](https://miro.medium.com/v2/resize:fit:1400/1*13SdC5l_VaPKtsIvq8z5kw.png)