I'm trynna make a javascript program who solves linear equations using nerdamer, I'm following nerdamer's documentation right here but I got error when I tried to use function solveEquations here's the code:
const nerdamer = require("nerdamer");
const eq = nerdamer.solveEquations(["3+x=9"]);
console.log(eq.toString());
here's the error I got:
const eq = nerdamer.solveEquations(["3+x=9"]);
^
TypeError: nerdamer.solveEquations is not a function
In order to use solveEquations, you need to load the Solve module as well. But also note that const cannot be used since nerdamer gets modified when other modules are loaded. For your example to work, do:
var nerdamer = require("nerdamer")
require('nerdamer/Solve')
const eq = nerdamer.solveEquations(["3+x=9"])
console.log(eq.toString())
Example: https://runkit.com/61a67e5dd78be10008bf0fcc/61a67e5d000388000831e495
Or, if you'll be using all modules, you can use a single import:
const nerdamer = require("nerdamer/all.min")
Here is the quick start guide: https://nerdamer.com/quickstart.html