Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Dec 2005
    Posts
    217
    Thanks
    1
    Thanked 0 Times in 0 Posts

    pushing values in array ??

    Hello forums !!
    I would like to push the values in array(without specifying index).
    Can anybody give me the suggestion.
    Note: It should be equivalent to PHP's
    PHP Code:
    $exp_array = array();
    $exp_array[] = "value1";
    $exp_array[] = "value2"
    (without specifying indexes)
    ...........etc

    Thanks in advance to all of you.

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    myArray[myArray.length] will add to the end of myArray
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •