I found the answer!
Although the alert message returns "HEADER_ROW" - that is not the way to compare it
the comparing method is as follows
if (myRowType != RowTypes.HEADER_ROW && myRowType != RowTypes.FOOTER_ROW)
However, I still dont understand
how I was supposed to understand that from the beginning...
For example, when setting a swatch color we use a real string "Black"
same goes with all types of styles
so why is this different?
If someone would be kind enough to give some explanation as to when return values are actually string and when they are properties, it would be a great help for me.
What I could advise is to keep touch with Object Model .
r/w The stroke type of the right edge. Can also accept: String.
r/w The row type.
See the difference what they accept?
From the other hand;
You could alert an array to display its elements, but it is still an array not a string.
I do see the difference
this will help me a lot - thanks!!
If you have not discovered it yet, there is good documentation of the DOM (ExtendScript for InDesign, InCopy, Illustrator, FrameMaker), both searchable online and offline over there: