Answer the question
In order to leave comments, you need to log in
How to recognize a function from a string in JS?
For example, there is a line "sin(30)-0.5+12*x-16" How can this line be turned into a function of the form:
function (x) { return Math.sin(30)-0.5+12*x-16;}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question