JSFiddle - React, Tailwind, and code Playground

JavaScript

function makeid()
{
    var text = "";
    var possibleChars = "._";
    var possibleLetters = "AB";

    text += possibleLetters.charAt(Math.floor(Math.random() * possibleLetters.length));
    for( var i=0; i < Math.floor(Math.random() * 3)+1; i++ )
        text += possibleChars.charAt(Math.floor(Math.random() * possibleChars.length));

    return text;
}

for (var i=0; i < 20; i++)
    $("body").append("<div>" + makeid() + "</div>");