Это результат, который я ищу:

Код: Выделить всё
const quotes = [
{
text: '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111',
},
{
text: '222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222',
},
];
const text = document.querySelector('.text');
function randButton() {
let random = Math.floor(Math.random() * quotes.length);
text.innerHTML = quotes[random].text;
}
randButton();Код: Выделить всё
.example-1 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
background: white;
border-style: solid;
border-radius: 5px;
padding: 3px 3px 3px 3px;
width: 425px;
}Код: Выделить всё
RandomПодробнее здесь: https://stackoverflow.com/questions/702 ... t-into-div
Мобильная версия