code: function(/*obj1, obj2,....deepCopy*/) {
          // unpacking arguments by hand benchmarked faster
          var l = arguments.length,
              args = new Array(l + 1);
  
          if (l === 0) {
            return {};
          }
  
          for (var i = 0; i < l; i++) {
            args[i + 1] = arguments[i];
          }
  
          //start with empty object so a copy is created
          args[0] = {};
  
          if (args[args.length - 1] === true) {
            //jquery extend requires deep copy as first arg
            args.pop();
            args.unshift(true);
          }
  
          return $.extend.apply(undefined, args);
        }
docs: returns new object representing multiple objects merged together optional final argument is boolean which specifies if merge is recursive original objects are unmodified  usage: var base = {a:2, b:6}; var extra = {b:3, c:4}; merge(base, extra); //{a:2, b:3, c:4} base; //{a:2, b:6}  var base = {a:2, b:6}; var extra = {b:3, c:4}; var extraExtra = {a:4, d:9}; merge(base, extra, extraExtra); //{a:4, b:3, c:4. d: 9} base; //{a:2, b:6}  var base = {a:2, b:{bb:4, cc:5}}; var extra = {a:4, b:{cc:7, dd:1}}; merge(base, extra, true); //{a:4, b:{bb:4, cc:7, dd:1}} base; //{a:2, b:{bb:4, cc:5}};