how to apply if condition only if elements are not empty javascript code example
Example: is var is not blank then display value in javascript
if(data !== null && data !== '') {
// do something
}
if(data !== null && data !== '') {
// do something
}