Array - index comparison and logging

hello i have

is there a one liner code to server log it?

also is there any better than this?
if (tag[0]==170 && tag[1]==0 && tag[2]==2 && tag[3]==1 && tag[4]==131 && tag[5]==128 && tag[6]==187)

To log it:

for(local i in tag) server.log(i);


local s=""; for(local i in tag) s+=i+","; server.log(s);

For comparison, I’d just have a compare array:

local comparetag[170,0,2,1,131,128,187]; for(local i=0;i<tag.len();i++) if (tag[i]!=comparetag[i]) break; if (i==tag.len()) server.log("matches");