Closed gda-gp closed 4 years ago
The code runs as expected if we change the code to:
interpreter.run(`
const tryValue = (x) => {
console.log('value of ' + x);
}
tryValue('xxxx');`)
So, the bug is at the string interpolation:
`value of ${x}`
You should escape character $
, like value of \${x}
Demo:
x
has no value inside function