<html>
<body>
<h1>JavaScript JSON</h1>
<h2>Create a JSON string from ant object.</h2>
<p id="demo"></p>
<script>
const myObj = {name: "John", age: 30, city: "New York"};
const myJSON = JSON.stringify(myObj);
document.getElementById("demo").innerHTML = myJSON;
</script>
</body>
</html>