I want to make an web page that solve a various ecuations (Linear or non-linear), so i have to make a function that gets a user input ecuation and transform it into an executable one .
For exemple i have:
<input type="text" id="ecuation">
and I get the value of this input:
const ecuation = document.querySelector("#ecuation");
let ecutionValue;
ecuation.addEventListener("input" , function(){
ecuationValue = ecuation.value;
})
Now i want this to be transformed into an ecuation that can be used in a function , or to introduse it into a function.
For example like this:
function ecuation() {
return //here must be returned the ecuation that user will enter on input
}