NPM module to solve quadratic equations.
npm i quadratic-equations-solver
The equation has to be under the ax²+bx+c=0 form. Example:
const solve = ;var a = '1';var b = '-12';var c = '-28';var solutions = ;var solution1 = solutions0; // Give you the first solution possiblevar solution2 = solutions1; // Give you the second solution possiblevar discriminant = solutions2; // Give you the discriminant (b²-4ac)
NOTE: If the discriminant is equal to zero, only one solution will possible, which means solution1 and solution2 will have the same value.