Question: I am adding letters and words to an empty text area using the following code:

HTML:

```
<textarea id="Content"></textarea>

<button class="AddTo" value="a">a</button>

```

jQuery:

```
$('.AddTo').on('click', function() {
  $('#Content').append($(this).val());
});

```

How can I delete the last value added to the text area such as "a" or "apple" without clearing everything? Basically I want a delete button to remove the last character.

Answer: 
You should keep an array of the values added to the textarea in javascript. If you want to revert back 1 word (or more) you would simple pop off the values from the array then populate the textarea from the shortened array.

Example:

```
var values = [];

$(function(){

    $('.AddTo').on('click', function() {
        values.push($(this).val());
      $('#Content').val( values.join(" ") );
    });

    $('.Backspace').on('click', function(){
        values.pop();
        $('#Content').val( values.join(" ") );
    });

});

```

**[JSFiddle DEMO](http://jsfiddle.net/jrulle/stLzjmsa/)**

*Demo with freeform text field: [jsfiddle](http://jsfiddle.net/jrulle/stLzjmsa/4/)*
A simple solution is to create a backspace button that removes the last character from the text:

```
$('#Backspace').click(function() {
  $('#Content').text(function (_,txt) {
    return txt.slice(0, -1);
  });
});

```