function deleteButtonPressed(todo) {
        db.get(todo._id).then(function(doc) {
            return db.remove(doc);
        }).then(function(result) {
            console.log('successfully removed the todo.');
        }).catch(function(err) {
            console.log('Failed to remove the todo')
        })
    }
// User pressed the delete button for a todo, delete it
User pressed the delete button for a todo, delete it
User pressed the delete button for a todo delete it
function deleteButtonPressed(todo) {
        db.get(todo._id).then(function(doc) {
            return db.remove(doc);
        }).then(function(result) {
            console.log('successfully removed the todo.');
        }).catch(function(err) {
            console.log('Failed to remove the todo')
        })
    }
function deleteButtonPressed ( todo ) { db . get ( todo . _id ) . then ( function ( doc ) { return db . remove ( doc ) ; } ) . then ( function ( result ) { console . log ( 'successfully removed the todo.' ) ; } ) . catch ( function ( err ) { console . log ( 'Failed to remove the todo' ) } ) }
User pressed the delete button for a todo, delete it
User pressed the delete button for a todo delete it