eval()
executes a string of JavaScript code as if it were a part of the script.uneval()
(deprecated) was used to return a string representation of an object, similar toJSON.stringify()
.
Example:
const code = 'console.log("Hello")';
eval(code); // Executes code
Tags: basic, JavaScript, eval
URL: https://www.tiktok.com/@jsmentoring/photo/7459446884436905249