Graphics program written in Javascript for webpage: simplify keystrokes

There are a lot of keystrokes involved in making a color move from one position to the next.

legPos[0]=new Array(0,LD,LD,LD,LD,LD,LD,LD,LD,LD,LD,LD,LD,L)
//legPos where [0] is relative to the body and each "LD" is relative to the previous part of the leg. ie) The knee joint is 6 LD's down from 0.

openingLGS=new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,22,0)
//openingLGS describes the movement of the legPos

as you can see, there is much repetitive keystroking.

//concat arrays to prevent huge lines of instructions. LASOrder puts the segments together; where stall1LGS represents an array of 15 zeros.

Still I had to type the stall1LGS array initially and it only useful when I need 15 zeros.

Maybe you can help with this part. I could use a time saver. I need an array that gives an increment of "0" to the previous array position.


thru a fifty count. It looks like an easy loop, but I'm struggling with it. And, really it's not ideal because I'll have to keystroke stroke brackets. The best I can come up with is to make an alphanumeric N012 represent 12 zeros.

Any script help/advice is appreciated.