Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Javascript only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
Javascript
Deleting elements
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
anupama385
New Member
Join Date:
Aug 2011
Posts:
4
#1
Deleting elements
Nov 28 '11, 03:27 PM
I have an array consisting of n elements. The number n is not known. How to delete those n elements from the array?
Rabbit
Recognized Expert
MVP
Join Date:
Jan 2007
Posts:
12517
#2
Nov 28 '11, 05:32 PM
Use the .clear() method. It will remove all elements from the array.
Comment
Post
Cancel
Dormilich
Recognized Expert
Expert
Join Date:
Aug 2008
Posts:
8694
#3
Nov 29 '11, 06:51 AM
or just reset it to an empty array.
Comment
Post
Cancel
anupama385
New Member
Join Date:
Aug 2011
Posts:
4
#4
Nov 29 '11, 08:01 AM
Hello
I tried to use the clear method. I would also like to tell that my listbox has multiple selection.
Comment
Post
Cancel
Rabbit
Recognized Expert
MVP
Join Date:
Jan 2007
Posts:
12517
#5
Nov 29 '11, 04:02 PM
Ok, you tried it. And the result was?
Also, we reserve one question per thread. You will need to post your listbox question in a different thread. You will also need to ask your questions with more detail.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment