方式一:
let weeks = ['日', '一', '二', '三', '四', '五', '六']; let day = new Date().getDay(); console.log(weeks[day]); // 二
方式二:
let week = "日一二三四五六".charAt(new Date().getDay()) console.log(week); // 二
方式一:
let weeks = ['日', '一', '二', '三', '四', '五', '六']; let day = new Date().getDay(); console.log(weeks[day]); // 二
方式二:
let week = "日一二三四五六".charAt(new Date().getDay()) console.log(week); // 二