Измените содержание всех тегов P

paras=document.querySelectorAll('p');//gets ALL the elements with <p> tags
paras.forEach(para=>{
    para.innerText +=' this text was appended afterwards';
    console.log(para.innerText)
})
Meandering Meerkat