Quiero agregar HTML a todos los elementos que tengan la misma clase (.testimonial-text). Sin embargo, cada vez que uso querySelectorAll para definir los elementos, insertAdjacentHTML devuelve un error que dice 'insertAdjacentHTML in not a function'. Funciona bien cuando uso querySelector (que apunta solo al primer elemento de la clase), pero nuevamente quiero apuntar e insertar html en cada elemento de la clase.
var testimonialText = document.querySelectorAll(".testimonial-text"); const testimonialTextBack = function () { const html = `<p>Testing</p>`; testimonialText.insertAdjacentHTML("beforeend", html); }; testimonialTextBack();