$ = (function() { console.log("first"); y = "YYYYY"; return y; })() /*other functions can use y as well*/