Answers for "remove space in elements in array javascript"

3

remove extra space in string js

newString = string.replace(/\s+/g,' ').trim();
Posted by: Guest on May-28-2020
0

remove empty or whitespace strings from array javascript

// Example 4
arr = arr.filter(entry => entry.trim() != '');
Posted by: Guest on January-05-2022

Code answers related to "remove space in elements in array javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language