1. Perché nel seguente testo mi vengono visualizzati tutti i mesi invece che solo febbraio?
2. Come si fa a fare in modo di vedere un giorno alla volta?
var a = [];
var i = 0;
while (i < 31) {
a.push(++i);
}
var b = [];
var i = 0;
while (i < 30) {
b.push(++i);
}
var c = [];
var i = 0;
while (i < 28) {
c.push(++i);
}
month = February
if (month == January) {
trace(a.join());
}
if (month == February) {
trace(c.join());
}
if (month == March) {
trace(a.join());
}
if (month == April) {
trace(b.join());
}
if (month == May) {
trace(a.join());
}
if (month == June) {
trace(b.join());
}
if (month == July) {
trace(a.join());
}
if (month == August) {
trace(a.join());
}
if (month == September) {
trace(b.join());
}
if (month == October) {
trace(a.join());
}
if (month == November) {
trace(b.join());
}
if (month == December) {
trace(a.join());
}

Rispondi quotando
