Call Us : +91-8376986802 (Viber, WhatsApp)

How to delete an entry using JavaScript?



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

var days = [“Sunday”,”Monday”,”Tuesday”,”Wednesday”, “Thursday”,”Friday”,”Saturday”];
document.write(“Number of days:”+days.length); delete days[4];
document.write(“
Number of days:”+days.length);

Leave a Reply