Initialize animation layer with loop

I'm trying to initialize a group of animations in a layer. The current code reads like this:

animTarget.animation["APunch"].layer = 1; 
animTarget.animation["BPunch"].layer = 1;
animTarget.animation["CPunch"].layer = 1;
animTarget.animation["AFire"].layer = 1; 
animTarget.animation["BFire"].layer = 1;
animTarget.animation["CFire"].layer = 1;
animTarget.animation["ALaugh"].layer = 1;
animTarget.animation["BLaugh"].layer = 1; 
animTarget.animation["CLaugh"].layer = 1; 
animTarget.animation["ADie"].layer = 1;
animTarget.animation["BDie"].layer = 1;
animTarget.animation["CDie"].layer = 1;

There has to be a more efficient way to loop through these animation strings and initialize these animations, but I can't solve it.

You can just iterate over animation to get all the animation states

c#:

foreach(var state in animTarget.animation)
{
    state.layer = 1;
}

js:

for(var state in animTarget.animation)
{
    state.layer = 1;
}

If you want to make sure it's one of the above, you could do something like

c# only, sorry :D

string[] anims = new string[] { "APunch", "BPunch" }; //etc - could declare this as a member variable
foreach(var state in animTarget.animation)
{
    if (anims.Contains(state.name))
        state.layer = 1;
}