Repeat a few things xTcountonce? I may be misunderstood, but it looks pretty simple:
for(var i = 0; i < xTcount; i++) {
doSomething();
doSomethingElse();
}
, for script , , , :
function repeat(fn, times) {
for(var i = 0; i < times; i++) fn();
}
repeat(doSomething, xTcount);
repeat(doSomethingElse, xTcount);