Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7693465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:05:42+00:00 2026-05-31T21:05:42+00:00

Yeah, looks insane, but let me explain better. When in Jquery we use for

  • 0

Yeah, looks insane, but let me explain better.
When in Jquery we use for example $(‘div’) its return an Array Collection or something like this: [div#container, div#header, div#logo], the magic thing is that Methods like push, length, pop, join, concat that are primitive methods from Array will not show you.
How can I get this behavior?? I want to return a Collection of Elements just like Jquery does but with my own methods (remove, appendHTML, and others) but not the default Array methods.
Any Ideas ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:05:43+00:00Added an answer on May 31, 2026 at 9:05 pm
    function() arrayLike {
        var FINAL = {
            length:0,
            splice:function(){}
            add:function(el){
                return FINAL[FINAL.length++]=el;
            };
        }
    }
    

    Now we can declare a var like this:

    var myarray = arrayLike();
    myarray.add('some');
    myarray.add('other');
    

    And the magic is that we write in Firebug (for example):

    myarray.
    

    Only the add() method will show you, but not the defaults Arrays Method (concat, push, pop…)
    Any Ideas to improve this code, please post It!! or write me (please!)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yeah, its a bit on this side of pointless, but I was wondering... I've
http://lesscss.org/ Yeah the language syntax looks cool, but are there any significant advantages? Because
Yeah, so question looks like I'm kidding, but it turns out that there are
Yeah, sounds silly but I'm a designers and the site I'm working on is
Yeah this works in FF and Chrome, but for some reason wont work in
Yeah, poorly worded question, but I really wasn't sure how to phrase it. :)
So yeah, I'm a Java guy in this crazy iPhone world. When it comes
So yeah, like I said, I've spent a few hours trying to fix this
My code works (yeah!) which sends json to a server.. would appreciate any thoughts
I recently started with WCF ( yeah I know I am behind :-) ).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.