Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>JSON.stringify()</h1> <p>JSON.stringify() converts booleans to strings.</p> <p id="demo"></p> <script> let bool = new Boolean(1); const myJSON = JSON.stringify(bool); document.getElementById("demo").innerHTML = myJSON; </script> </body> </html>