the meaning of jQuery javascript:

I would like to ask the meaning of the following code:

$.fn.datepick = function(options) {
    var otherArgs =, 1);

These are lines 2036 – 2037 of jQuery plugin
file ‘jquery.datepick.js’ from

  • Call function with array of arguments
  • Javascript array becomes an object structure
  • jsDoc - how to specify array length
  • Convert textarea value to javascript array (separated by new lines)
  • How does 'Number' in Array.prototype.filter(Number) work?
  • How to check a value present in other array and vise versa

  • Remove elements from an array until there are just 10 elements
  • Converting a JS object to an array
  • Summarize count of occurrences in an array of objects with Array#reduce
  • JavaScript: Access own Object Property inside Array Literal
  • Is it necessary to convert arguments to Array before calling apply?
  • Retrieving multiple string values from localstorage in javascript
  • One Solution collect form web for “the meaning of jQuery javascript:”

    The full code look like this:

    /* Attach the datepicker functionality to a jQuery selection.
       @param  options  (object) the new settings to use for these instances (optional) or
                        (string) the command to run (optional)
       @return  (jQuery) for chaining further calls or
                (any) getter value */
    $.fn.datepick = function(options) {
        var otherArgs =, 1);
        if (isNotChained(options, otherArgs)) {
            return plugin['_' + options + 'Plugin'].apply(plugin, [this[0]].concat(otherArgs));
        return this.each(function() {
            if (typeof options == 'string') {
                if (!plugin['_' + options + 'Plugin']) {
                    throw 'Unknown command: ' + options;
                plugin['_' + options + 'Plugin'].apply(plugin, [this].concat(otherArgs));
            else {
                plugin._attachPlugin(this, options || {});