function one(obj) { var a = 'arege'; obj.f(a); } function two(obj) { one(obj); } two({f:function(a) {alert(a)} })