Removing extra spaces from user input
If I'm not misunderstanding the intent of your script you don't need the if elses at all.

For starters not having a space to trim when calling trim(Right or Left) is not a problem. No errors are thrown. So you could just do this:

function addWords() {
    var value = $('#input').val();

    if ((/^[a-zA-Z\s]*$/.test(value)) &amp;&amp; (value !== '')) {
        value = value.trimLeft().trimRight();
        $('#output').append($('&lt;span&gt;&lt;/span&gt;').text(value + ' '));
    } else {
        alert('Please use characters only.');
    }
}


For simplicities sake instead of value.trimLeft().trimRight() you can just use value.trim().

Edit: Also as Dagg pointed out(see comments below) String.prototype.trimLeft() and String.prototype.trimRight() are non-standard but String.prototype.trim() is in the spec's for ES5.