The variable `this.engenes_comparte` is showing up as undefined inside the subscribe function, but it works fine outside of it.
baja(){
this._restService.getEngines(this._globalService.currentFisherMan.nid).subscribe((data : any[]) => {
let state = 0;
for (let index = 0; index <= data.length; index++) {
for (let l = 0; l <= this.engines_compare.length; l++) {
if(data[index].nid != this.engines_compare[l].nid){
}
}
}
console.log(this.engines_compare);
});
this.sube();
}