function foo() { var str = function(args) { var a=''; for (var i in args) { a=a+i; } return a; }(arguments); return str; }