Add generative code
Now you can start adding your generative code into the index.html
file.
// ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ Add your code here ↓↓↓↓↓↓↓↓↓↓↓↓↓↓
const container = document.createElement("div")
container.innerHTML = "<span>GM. I'm Seed #" + seed + "</span>";
document.body.prepend(container)
// ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your code here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑
In your code, instead of using Math.random()
for random number generation, use the mathRand()
function provided in the index.html
file. mathRand()
is a specific function that creates a random number based on an on-chain seed.
We suggest minifying your code to save on Bitcoin network fees.
Last updated