element[0].innerHTMl="new text";
let element = document.querySelectorAll("p")[0];
element.innerHTML="new text";
const chain = (n) => Array(n)
.fill(1)
.map(() => Math.floor(Math.random() * 9) + 1)
.map((v, i, a) => v + (a[i + 1] ?? (Math.floor(Math.random() * 9) + 1)) * 10);
chain(10); // [ 75, 87, 48, 54, 75, 27, 92, 69, 56, 25 ]