0 votes
in JavaScript by
What is eval in Javascript?

1 Answer

0 votes
by

The eval() function evaluates JavaScript code represented as a string. The string can be a JavaScript expression, variable, statement, or sequence of statements.

console.log(eval("1 + 2")); //  3
...