Obtenha o texto de uma tag
var el = document.querySelector('div');
text = el.textContent || el.innerText;
console.log(text);
Curious Tom
var el = document.querySelector('div');
text = el.textContent || el.innerText;
console.log(text);