zig.com Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h2>JSON.stringify() will remove any functions from an object.</h2>
<p id="demo"></p>
<script>
  const obj = { name: "John", age: function () { return 30; }, city: "New York" };
  const myJSON = JSON.stringify(obj);
  document.getElementById("demo").innerHTML = myJSON;
</script>
</body>
<!-- /js/tryit.asp?filename=tryjson_stringify_function  Thu, 06 Feb 2025 18:15:27 GMT -->
</html>