Answers for "how to set random dice image with js"

0

how to set random dice image with js

function mathRandomDice() {
    document.getElementById("dice").innerHTML = Math.floor(Math.random() * 6) + 1; 

}

var x = mathRandomDice;

  if (x = 1) {
            d.innerHTML = '<img src=https://image.ibb.co/cQKOhc/dice1.png>';
    }
Posted by: Guest on June-16-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language