How can I determine if an element in an array is empty? Currently, it returns false, but I need to know if the element is blank. The array element may contain spaces.
Code
let TestNumber= 'DATA- - -'
let arrStr =this.TestNumber.split(/[-]/);
if(arrStr[1]==''){
}
Actual Output: false
Expected Output: true;
data - ['DATA', ' ', ' ', '']