Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!

Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > Javascript


Thread Tools Rate Thread Display Modes
Old 02-10-2016, 12:16 AM   #1
Registered User
Join Date: Dec 2013
Location: Banglore
Posts: 336
Send a message via AIM to chinmay.sahoo Send a message via MSN to chinmay.sahoo
Arrow How to delete an entry using JavaScript?

The "delete" operator removes an array element, but oddly does not change the size of the array.

<script type="text/javascript">
var days = ["Sunday","Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday"];
document.write("Number of days:"+days.length); delete days[4];document.write("<br />Number of days:"+days.length);
This produces
Number of days:7
Number of days:7

Step Up Height Increaser
Sandhi Sudha
chinmay.sahoo is offline   Reply With Quote

Old 03-24-2016, 09:07 PM   #2
Registered User
Join Date: Jan 2016
Posts: 32
The "delete" operator removes an array element, but oddly does not change the size of the array.
dungtuyet is offline   Reply With Quote
Old 03-16-2017, 12:16 AM   #3
Registered User
Join Date: Jan 2017
Location: Ahmedabad
Posts: 126

You have need to refer this link for Delete an entry using javascript from array.

Sonvi Belani
Ecommerce Website Developer
custom software companies India
ASP.NET software companies India
sonvi.belani is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Implement Interfaces in JavaScript JavaScriptBank Javascript 1 03-30-2014 11:48 PM
Javascript Countdown Timer redirecting Affiliate Links JavaScriptBank Javascript 0 05-20-2013 10:29 PM
40 Super Nice JavaScript Extensions and Plugins JavaScriptBank Javascript 0 04-28-2013 11:14 PM
9 Funniest JavaScript effects JavaScriptBank Javascript 0 04-18-2013 02:13 AM
65 Free JavaScript Photo Gallery Solutions JavaScriptBank Javascript 0 04-15-2013 06:38 PM

All times are GMT -7. The time now is 02:55 PM.

Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.