I wish to display each char of my array into a box in only one row (see image below) using javascript.

When I use grid it displays only in one column and also sometimes my box is empty.
Here is my following code working, but only display chars without css
var questionParse = JSON.parse(currentQuestion.question); //here is for example surreal
//display letters in random order
for (let i = questionParse.length; i >= 0; i--) {
const randLetters = Math.floor(Math.random() * (i+1));//Var for random letter
[questionParse[i], questionParse[randLetters]] = [questionParse[randLetters], questionParse[i]];
}
questionTxt.innerHTML = questionParse.join(" "); //displays for example : r a r s l e u
Here is the code I tried but displays in column and sometimes give empty box :
//Parse string to create array of chars, here string can be as an example surreal
var questionParse = JSON.parse(currentQuestion.question);
//Display letters in random order
for (let i = questionParse.length; i >= 0; i--) {
var anagrammeLetter = document.createElement('span');
anagrammeLetter.className = "box";
const randLetters = Math.floor(Math.random() * (i+1));//Var for a random letter
[questionParse[i], questionParse[randLetters]] = [questionParse[randLetters], questionParse[i]];
anagrammeLetter.textContent = questionParse[i];
questionTxt.appendChild(anagrammeLetter);
}
This is the style I use, but if you have a style using tailwind then it's perfect for me as well Style :
.box {
width: 60px;
height: 60px;
border: 2px solid var(--empty);
margin: 4px;
color: black;
text-transform: uppercase;
display: grid;
place-items: center;
font-family: Arial, Helvetica, sans-serif;
font-size: 2.4rem;
}
Does anyone have any idea ? Thanks in advance