+ 2
Why I got NaN
Sometimes I got NaN as output when I enter some random numbers like 5, 4, 6 Code link:- https://replit.com/@Girish-kumarku5/Quadratic-equation-solver?s=app
2 Answers
+ 2
A negative number is produced at line 9 when all 3 inputs are positive numbers
Math.sqrt() will return null when a negative number is passed.
Null is not a number.
btw
The link seems to be broken when using the android app.
+ 1
I fixed the code