javascript - How do I delete and move later function arguments to the left if an object type is excluded? -


i apologize if has been answered. don't know better technical term method , can't seem find here or google searches.

basically want able make function how jquery handles ajax function arguments. example: $.get(url, callback); , $.post(url, data, callback);

basically if data excluded function move callback left in place. since when function runs uses variable names input order. presuming method involve checking arguments[1] , arguments[2] want make sure if correct way since have code clean possible.

instead of checking arguments[1] , arguments[2] , should check

$.post(url, data, callback) 

whether url string, data object , callback function


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -