function a(x){ var z = 3 function b(y){ console.log(x+y+(++z)) } return b } var geta = a(5) geta.b(4)