Pass comma seperated arguments to js function.
I have the following function:


    function calculateAspect(options){
    	def = {
    		orgw: 0,
    		orgh: 0,
    		tarw: 0,
    		tarh: 0
    	};
    	o = $.extend(def,options);
    	console.log(o);
    
    	
    };    
    calculateAspect({orgw:640});
And i want to be able to pass it values like following:

    calculatedAspect(640,480,320)
or

    calculateAspect(200)

This may not seem logical, given the function. But i am just curious how to pull it off.
Pass comma seperated arguments to js function.
===

I have the following function:


    function calculateAspect(options){
    	def = {
    		orgw: 0,
    		orgh: 0,
    		tarw: 0,
    		tarh: 0
    	};
    	o = $.extend(def,options);
    	console.log(o);
    
    	
    };    
    calculateAspect({orgw:640});
And i want to be able to pass it values like following:

    calculatedAspect(640,480,320)
or

    calculateAspect(200)

This may not seem logical, given the function. But i am just curious how to pull it off.