gui-ying233 / my-bot

Prefer var declarations be placed at the top of their scope JS-0102
Anti-pattern
Minor
3 months agoa year old
All 'var' declarations must be at the top of the function scope
23
24bot.login().then(async () => {
25	for (var m = 6; m <= 12; m++) {
26		for (var d = 1; d <= days[m]; d++) {27			if (m * 100 + d < (today.getMonth() + 1) * 100 + today.getDate()) {
28				console.log(String(m).padStart(2, 0), String(d).padStart(2, 0));
29				try {
All 'var' declarations must be at the top of the function scope
22	value = "";
23
24bot.login().then(async () => {
25	for (var m = 6; m <= 12; m++) {26		for (var d = 1; d <= days[m]; d++) {
27			if (m * 100 + d < (today.getMonth() + 1) * 100 + today.getDate()) {
28				console.log(String(m).padStart(2, 0), String(d).padStart(2, 0));
All 'var' declarations must be at the top of the function scope
121	cronTime: "0 0 0/1 1/1 * *", // http://www.cronmaker.com/
122	onTick: async () => {
123		try {
124			var d = new Date();125			console.log(
126				`${d.getFullYear()}-${String(d.getMonth() + 1).padStart(
127					2,