Get the combined text contents of each element in the set of matched elements, including their descendants.
The text contents of the collection.
$('.orange').text();//=> Orange$('ul').text();//=> Apple// Orange// Pear Copy
$('.orange').text();//=> Orange$('ul').text();//=> Apple// Orange// Pear
https://api.jquery.com/text/
Set the content of each element in the set of matched elements to the specified text.
The text to set as the content of each matched element.
The instance itself.
$('.orange').text('Orange');//=> <div class="orange">Orange</div> Copy
$('.orange').text('Orange');//=> <div class="orange">Orange</div>
Get the combined text contents of each element in the set of matched elements, including their descendants.