Browse - programming tips - javascript remove trailing empty array entriesDate: 2008mar14 Language: javaScript Q. How to I remove entries at the end of a javaScript array that are empty? A. Here is an efficient function that does it: function removeTrailingEmpty(a) { while (a[a.length-1] == '') { a.pop(); } return a; }
Add a commentSign in to add a comment | Advertisements:
|