var counters = {}; function next(name){ if(!counters[name]){ counters[name] = 1; } else { counters[name]+=1; } return counters[name]; } ПРОБЛЕМ В ПОДАДЕНИЯ ПАРАМЕТЪР НА draw-table 0 1