DEV Community

はるはる Haruharu
はるはる Haruharu

Posted on

1

Introducing the Random Number Generator Function Maker for JavaScript!

Coding Made Easy: Introducing the Random Number Generator Function Maker for JavaScript!

Overview

You can use it here!

https://randommathjavascript.calc.haruharutv.jp/

Technologies Used

* HTML
* CSS
* JAVASCRIPT
Enter fullscreen mode Exit fullscreen mode
  • Image of the screen image.png

How to Use

It's very simple. Just open the site, enter the minimum and maximum values, and press the generate button to easily create a random number!

slide1.PNG

You can reference this code in the same way you would use a variable to generate a random number within the specified range!

Try It Out

Let's do a quick experiment using the code we mentioned earlier to write some JavaScript.

Your one-time code is <strong id="random"></strong>
<script>
document.getElementById("random").innerHTML=Math.floor(Math.random() * (9999 - 1000 + 1)) + 1000;
</script>
Enter fullscreen mode Exit fullscreen mode

スライド

You can see that it works well when you run the code like this.

Please bookmark it and use it anytime!

We support engineers every day!

If you find this helpful, please give it a like!

While UUIDs are generally used for management, if you need to use random numbers, please give it a try! It's easy with just a single line of code! (Although UUIDs can also be easily generated in languages like GAS or server-side languages)

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (1)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more