Entfernen Sie leere oder Whitespace -Saiten von Array JavaScript

// Example 4
arr = arr.filter(entry => entry.trim() != '');
Sleepy Starling