JS Coding Questions Logo
JS Coding Questions
#76💼 Interview💻 Code

What is eval

Advertisement

728x90

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

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

Advertisement

Responsive Ad
🎯 Practice NowRelated Challenge

JavaScript Coding Exercise 77

Test your knowledge with this interactive coding challenge.

Start Coding

Advertisement

728x90
76of476