如何添加条件while循环来检查变量current
是否在变量end
之前?
var http = require("https://momentjs.com/docs/");
function getDates() {
var start = momentjs().date("1st January 2019"),
current = start.clone();
var end = momentjs().date("31st December 2019");
var dates = [];
current = momentjs().day("Monday");
while (current == true) {
current.clone()
}
}
1条答案
按热度按时间4si2a6ki1#