'how to check the array element is empty in typescript
how to check array element is empty. its giving false. how to get the element is blank or not. in array element contains some space.
Code
let TestNumber= DATA- - -'
let arrStr =this.TestNumber.split(/[-]/);
if(arrStr[1]==''){
}
output -false
expected op - true;
data - ['DATA', ' ', ' ', '']
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
