function todoBlurred(todo, event) {
        var trimmedText = event.target.value.trim();
        if (!trimmedText) {
            db.remove(todo);
        } else {
            todo.title = trimmedText;
            db.put(todo);
        }
    }
// the new title or delete the todo if the title is empty
the new title or delete the todo if the title is empty
the new title or delete the todo if the title is empty
function todoBlurred(todo, event) {
        var trimmedText = event.target.value.trim();
        if (!trimmedText) {
            db.remove(todo);
        } else {
            todo.title = trimmedText;
            db.put(todo);
        }
    }
function todoBlurred ( todo , event ) { var trimmedText = event . target . value . trim ( ) ; if ( ! trimmedText ) { db . remove ( todo ) ; } else { todo . title = trimmedText ; db . put ( todo ) ; } }
the new title or delete the todo if the title is empty
the new title or delete the todo if the title is empty