JavaScript array query

Results 1 to 2 of 2

Thread: JavaScript array query

  1. #1
    Tony Guest

    Default JavaScript array query

    How do you delete an item out of a JavaScript array?<BR>From what I have been able to find out, you cannot do this. Am I correct in thinking this???<BR><BR>Thanks,<BR>Tony

  2. #2
    Join Date
    Dec 1969

    Default Of course you can

    Do you really need to delete it or just set it to zero or something? Zero is easy.<BR><BR>Otherwise if you need to delete it, you&#039;ll have to set each element in the array after the deleted item to the value of the item that comes next. Once that is done, resize the array to be one item less. You&#039;ll probably have to create another temp array to do this... it&#039;s all the same as you&#039;d do in C++.

Posting Permissions

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