获取两个日期的时间间隔 (天数)
const dayDif = (date1, date2) => Math.ceil(Math.abs(date1.getTime() - date2.getTime()) / 86400000)dayDif(new Date("2022-09-03"), new Date("2022-11-15"))
打乱一个数组,重新组合
const shuffle = array => array.sort(() => 0.5-Math.random());
shuffle([29,3,57,2,40])