How can you set the text content of an element using jQuery?
Description : Use the .text() method to set or retrieve the text content of an element.
Answer :
To set the text content of an element using jQuery, use the `.text()` method. For example,`$('#elementId').text('New Text Content');` changes the text inside the element withID`elementId` to 'New Text Content'. The `.text()` method can also be used to retrieve the current text content if called without arguments, such as`var content = $('#elementId').text();`, which stores the element's text content in the variable `content`.