Edit in JSFiddle

function alertFormattedName(firstName,lastName,callback){
    var formattedName= callback(firstName,lastName);
    alert(formattedName);
}

var callback = function(firstName,lastName){
    return "This gentleman first name is "+firstName +" and last name is "+ lastName;
}

alertFormattedName("John","Dallas", callback)