How to clear the text area value in the jquery

How to clear the text area value in the jquery
Clear the value in the textarea, input tag very easily on jquery with few lines of code. Very easily you can do this. Just set the textarea value to empty. It will clear the all the value in the textarea.

$('textarea').val('');

Code:
function clrbtn(){
$('textarea').val('');
})
<textarea></textarea><button onclick=clrbtn()>clear</button>

Output:
Type the your text in the below textarea and click the clear button to check it


Copyright Labw3