Some text
23.12
I have HTML document:
Some text
-
You need to get container, then all children, then filter those children. If this is going into a production environment, you'll want to do some error checking and make sure none of those elements return null, undefined or some other bad value.
var container = document.querySelector('.content'),
allKids = container.querySelectorAll('*'),
kidsWithContent = Array.from(allKids).filter(item => item.textContent.length !== 0);
console.log(kidsWithContent);
Some text
23.12