uneval()
was used to return a string representation of an object or expression, similar to how eval()
works. However, uneval()
is deprecated and not supported in all environments.
Example:
const obj = { name: 'John' };
console.log(uneval(obj)); // '({ name: "John" })'
Tags: basic, JavaScript, eval
URL: https://www.tiktok.com/@jsmentoring/photo/7459148995630337313