function remove(){
    console.log(xxx());
    if(xxx() != true){
        console.log(xxx());
        return;
    }
    console.log('removed');
}
function xxx(){
    SweetAlert.swal({
            title: "Are you sure?",
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55"},
        function(isConfirm){
            if (isConfirm) {
                return true;
            } else {
                return false;
            }
        }
    );
}
How to get return from function xxx().
That's always return undefined when i fire remove().
If return is true i want to do console.log('removed').
 
     
    