***Update on 16 Jan 2021***

I have looked at this question later, finding that it is a silly question, as we can evaluate js code using `eval`, or by constructing a function

```js
new Function(...paramsAsString, codeAsString)

```

BTW, here is a bud-version of the [app](https://plotto.netlify.com) I was working on.

---

I want to create a simple graphing calculator, the user will put the
mathematical expression into an input element, js will reach it using input.value :

```
let input = document.querySelector('#text');

```

while drawing the function I can use `eval(...);` but it is so slow,
so I will be so grateful if you have any way to store some string looks like this
("x => " + "sin(x)") into a variable that is a function,

```
let expr = parseJS("x => " + "sin(x)");
console.log(expr(PI));
// 1

```