//Pretend there is a <p> with class "example" const myParagraph = document.querySelector('.example'); //You can do many this with is myParagraph.textContent = 'This is my new text';
const content = document.querySelector('.content'); const towns = ['Helsinki', 'Espoo', 'Vantaa']; towns.forEach(city => { content.innerHTML += `<p>${city}</p>`; });
var el = document.querySelector(".myclass");
const para = document.querySelectorAll('p');
var x = $(".yourclass")[0]; console.log('jq' + x); var y = document.querySelector(".yourclass"); console.log('js' + y);
document.querySelector(".example");