Get the text content of an element

Returns the raw text content of the ele element and its children. All the HTML tags are excluded.
const text = ele.textContent;

See also