function plus(a, b, func) { var sum = a+b; func.call(this, sum); } plus(2, 3, function(result) { alert(result); });