I have this code to fill a multidimensional array
filaCalendario: string[] = [];
filasCalendario: string[][] = [];
crearFila(){
for (let actividad of this.listaActividades) {
this.filaCalendario.push(actividad.faseId);
this.filaCalendario.push(actividad.descripcion);
for (let dia of this.cabeceraCalendarioNumeroDiaDeLaQuincena) {
if (new Date(actividad.fecha).getDate() == dia) {
this.filaCalendario.push(actividad.duracion.toString());
}
else {
this.filaCalendario.push("");
}
}
this.filasCalendario.push(this.filaCalendario);
this.filaCalendario.splice(0);
}
console.log(this.filasCalendario);
}
}
After push filaCalendario into filasCalendario I delete the elements of filaCalendario to push the new values but after
this.filasCalendario.push(this.filaCalendario);
this.filasCalendario is empty too
After push it the first time i get this
And after splice filaCalendario I get this
Any idea, please?
Thanks

