Javascript Code Function Clean Array NO Duplicates, Empty Lines & Multiple Spaces Removed
Javascript Code Function to Take an Array and [1] Remove Empty Lines or Lines of the Array that are Only Whitespace [2] Replace Multiple Spaces with Single Space and Trim Each Line of Array [3] Remove Duplicate Items from the Array
Here is a handy and compact function to totally clean an array by ...
- Removing empty or whitespace only lines.
- Remove multiple spaces from each array item.
- Remove duplicates.
Returning an array with no duplicates or blank entries each element of the array is trimmed with multiple spaces removed