Hello im trying to use Math.min but i am getting NaN as a result, this is the code.
method using Math.min
method() {
var DeltaPrueba = this._markerService.getDeltasRx1();
console.log(DeltaPrueba); // 1
var menor = Math.min(DeltaPrueba);
console.log(menor); //1
}
Service
CalculateDeltas(){
/* do some math to calculate then save in array Deltas*/
Deltas = [DeltaT1,DeltaT2,DeltaT3,DeltaT4,DeltaT1CR,DeltaT2CR,DeltaT3CR,DeltaT4CR] ;
}
getDeltasRx1(){
return Deltas;
}
Console log number 1 show the array with all de data like this:
["18.20", "0.00", "425.97", "316.87", "667.80", "422.34", "425.99", "316.89"]
Console log number 2 show the NaN :
NaN