how about something like this?

var x = function(config){
        var default = {
                x : '',
                y : '',
                z : ''
        }
        
        args = Array(arguments)
        
        for(var i = 0; i < args.length; i++){
                for(var prop in config){
                        if(default.hasOwnProperty(prop)){
                                config[prop] = default[prop];
                        }
                }
                // process the config element.
        }
}

On Jun 25, 2011, at 11:56 PM, Matthew Bramer wrote:

> @Gary Katsevman, 
> config will only contain objects.
> 
> -- 
> To view archived discussions from the original JSMentors Mailman list: 
> http://www.mail-archive.com/[email protected]/
>  
> To search via a non-Google archive, visit here: 
> http://www.mail-archive.com/[email protected]/
>  
> To unsubscribe from this group, send email to
> [email protected]

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to