var foo = function(a){ return a * 2; } var bar = foo(2); foo = function(a){ return a / 2; } bar = foo(bar);