i have an long const values below like this ,is it possible to create in function in typescript to reduce a long const.
export const DepartTime = [\'00.00\', \'
I don't think you can reduce it. This may not help, but here is JS version :
var foo = []; for (var i = 0; i <= 48; i++) { var n = i%2==0 ? i/2+'.00' : (i+1)/2-1+'.30'; if(n<10) //zero-left padding n = '0'+n; foo.push(n); } console.log(foo);