問題:
How do I remove empty elements from an array in JavaScript? 如何從JavaScript中的數組中刪除空元素? 數組
Is there a straightforward way, or do I need to loop through it and remove them manually? 有沒有簡單的方法,仍是我須要遍歷它並手動將其刪除? oop
解決方案:
參考一: https://stackoom.com/question/1BAW/從Javascript數組中刪除空元素參考二: https://oldbug.net/q/1BAW/Remove-empty-elements-from-an-array-in-Javascript