JSFiddle - React, Tailwind, and code Playground
by Aleksey Karagodnikov
HTML
<form name="form">
<input onclick="calc()" type="button" value="" />
<input type="text" name="field" value="" />
</form>
JavaScript
function calc() {
var a = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];
var b = ['D', 'X', 'H', 'S', 'V', 'P', 'U', 'A', 'N', 'T', 'R', 'M', 'Y', 'E', 'B', 'R', 'Z', 'K', 'W', 'F', 'G', 'C'];
var wra = a[Math.round(Math.random() * (a.length - 1))];
var wrb = b[Math.round(Math.random() * (b.length - 1))];
document.form.field.value = wra + wrb;
}