RSS

Unset an array item in javascript

29 Dec

Suppose you have an array my_array.

To unset an item of my_array just use the following:

my_array.splice((index),1);

where index is the key of the value of my_array which you want to unset.

Advertisements
 
Leave a comment

Posted by on December 29, 2011 in javascript

 

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: