Is there a way to incorporate JS calculation into a CSS Bootstrap colored box to display random numbers? The code below shows how the structure can be set up.
Here is an example of code for a colored box in Bootstrap:
<div class="row align-items-center number-row">
<div class="col-5"> </div>
<div class="col-2 p-3 mb-2 bg-secondary text-white">327</div>
<div class="col-5"> </div>
</div>
This is the JavaScript code:
<h2>JavaScript Math</h2>
<p id="demo"></p>
<script>
function maths
let x = Math.floor((Math.random() * 1000) + 1);
document.getElementById("demo").innerHTML = x;
</script>