0

How i can fix my calculation function with output NaN in javascript? I need my output with number Please anyone help me, thanks.

This link my code : #1 https://code.sololearn.com/wVlYSKg7Lwpo #2 https://code.sololearn.com/wuKpJpLrG6lL i have problem in coloumn "PROBALITY WAITING CLIENT"

16th Jul 2017, 3:07 PM
Muh. Taris Anshari
Muh. Taris Anshari - avatar
12 Respuestas
+ 6
log into your sololearn account on sololearn.com copy into codeplayground there
16th Jul 2017, 12:51 PM
jay
jay - avatar
+ 4
If you don't provide your code, we're not able to help you fixing it ^^
16th Jul 2017, 12:40 PM
visph
visph - avatar
+ 3
It seems to have Php code inside, so you need to run it on a server handling Php (even at least a local server)... On code playground you need to copy paste it to a 'php' project rather than in the html tab of a 'web' project: do that, and tell us if you've the expected output or not (actually does'nt output NaN if rub in php code playground project ;)) [edit] your second link seems wrong ^^
16th Jul 2017, 1:49 PM
visph
visph - avatar
0
how i can post my code? i use my smartphone for post this and my code in my laptop? please tell me, i'm very newbie
16th Jul 2017, 12:50 PM
Muh. Taris Anshari
Muh. Taris Anshari - avatar
0
thankyou very much, wait i will try
16th Jul 2017, 12:52 PM
Muh. Taris Anshari
Muh. Taris Anshari - avatar
0
i can press sumbit button in #1 (input.php). I don't know why what happen, in my laptop it works
16th Jul 2017, 3:09 PM
Muh. Taris Anshari
Muh. Taris Anshari - avatar
0
I don't quite understand what you are asking, but in JavaScript you can use "var num = Number(string)" to convert a string to a number value.
16th Jul 2017, 3:13 PM
James
James - avatar
0
but i don't input any string james, i just input a number, but output show "NaN", its my problem in coloumn Probalitu waiting client
16th Jul 2017, 3:16 PM
Muh. Taris Anshari
Muh. Taris Anshari - avatar
0
I just noticed. There is no ^ operator in javascript. You need to use Math.pow().
16th Jul 2017, 3:27 PM
James
James - avatar
0
i will try tomorrow james, thanks for suggestion bro
16th Jul 2017, 3:28 PM
Muh. Taris Anshari
Muh. Taris Anshari - avatar
0
And I think Math.E will get the e constant, instead of approximating it as a regular number.
16th Jul 2017, 3:30 PM
James
James - avatar
0
okay i will try, thanks
16th Jul 2017, 3:31 PM
Muh. Taris Anshari
Muh. Taris Anshari - avatar