Calculation trouble on mobile
Good morning,
I need to make a calculation ( age^
-0,13)
To perform this I do:
- var age = 22 ; /* Here simplified, in reality the result of date calculation */
- var K4HF = Math.pow(age, -0.13);
- var K4HFB = parseFloat(K4HF);
- var test = typeof K4HFB;
- alert(test);
- alert(K4HFB);
- alert (K4HFB.toFixed(2))
This works fine on Safari Desktop
The first alert give me : number
The second the value : 0.6690907894046102
And the last one the value : 0.67
Exactly what i need
But the result on mobile give:
Fist alert : number
second : NaN
third : NaN
Could someone tell me what I'm doing wrong ?
Thanks