Hello there once again,
i generate a string of 6 digits with the code below as such =>
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var string_length = 6;
var randomstring = '';
for (var x = 0; x < string_length; x++) {
var letterOrNumber = Math.floor(Math.random() * 2);
if (letterOrNumber == 0) {
var newNum = Math.floor(Math.random() * 9);
randomstring += newNum;
} else {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum, rnum + 1);
}
}
const string = randomstring;
But i actually wanna add spaces between the string like
if the string is bc48snwk2
spaces should be added to make the string look as such -> b c 4 8 s n w k 2