function arr() local a = {} for i=1, 10 do a[i] = i+1*i*i+2 end return a end b = arr() for i=1, 10 do print (b[i]) end