I think I got it!
I did a for loop inside the layer in the effect property like this:
var proj, curItem, fxLength;
proj = app.project;
curItem = proj.item(1);
curLayer = curItem.layer(1);
fxLength = curLayer.effect.numProperties;
for(var i=1;i<=fxLength;i++){
var curFx = curLayer.effect(i);
alert(curFx.name);
}
with this I know my loop works!