How to determine if a found object is empty?
The code below, which I tested with alter,
The left popup is "empty". The right popup is [objet charater].
This shows that there are difference. Since it is different, the choice can be judged.
But when I use if(!qz===''), It always prompts (!qz===‘’) with a result of false.
What do I have to write "if ( )" to get it right?
Another problem:
If an @ is found, and there is only one, also execute the subsequent code.
If the loop does not find an @, it prompts alert(“No one @”).
How to write this?
Thank you very much.
for (var h = 0, k = 0; h < sa.length; h++) {
if ("TextFrame" == sa[h].constructor.name) {
if (sa[h].overflows) {
sa[h].fit(FitOptions.FRAME_TO_CONTENT)
}
//alert(sa[h]);
var qz = getGrepSearch("@", sa[h]);
alert(qz);
alert((!qz === ''));
//for (var k = 0; k < sa.length; k++) {
if (qz === !"") { 
