Extend jQuery's Each

For a project, I would like to have javascript objects that can be iterated over in a particular order. One way of accomplishing this is to extend jQuery's each function to recognize this new type and single it out. This is a test of that method.

It doesn't work because the extended method has functionality added to it. It isn't even necessary because jQuery uses the length argument to determine if something is an array or not, so I just have to have a length property to iterate as an array.