How jQuery('selector') returns an array but also supports chaining.
If jQuery returns array like object how does in its response it containts [element1, element2] instead of {0: element1, 1: element2} and how prototype is linked to [element1, element2]
Can someone provide a sample example creating custom object plugin which returns array and also have one childFunction method to support chaining.
Expected output:
var plugin = function(selector) { ///////Code comes here};
plugin('selector') // should return static array [1,2];
plugin('selector').childFunction('selector') // should return static array [1,2]