如何将数组没五分钟补全如:将timeArray:['6:05','6:15','6:20','6:25','6:40','6:45','6:55','7:00','8:00','9:00'],补成timeArray:['6:05','6:10',6:15','6:20','6:25','6:30','6:35',6:40','6:45','6:50','6:55','7:00','7:05',········'8:00',········'9:00']详细说一下我的问题:后台传过来三个数组timeArray:['6:05','6:15','6:20','6:25','6:40','6:45','6:55','7:00','8:00','9:00'],in:[10,20,50,60,40,70,50,80,20,10],out:[30,40,35,65,0,40,20,30,10,20],这时我要把时间这个数组补全成五点到二十四点,每五分钟的时间数组,而另外两个数组对没有这个时间间隔的数据进行补零['6:05','6:10',6:15','6:20','6:25','6:30','6:35',6:40','6:45','6:50','6:55','7:00','7:05',········'8:00',········'9:00']in:[0,········,10,0,20,50,60,0,0,40,70,50,80,········20,········10········],out:[········30,0,40,35,65,0,40,20,30,········,0,10,········,20,0,········],
添加回答
举报
0/150
提交
取消