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> <h2>Creating an Array from JSON</h2> <p id="demo"></p> <script> const myJSON = '["Ford", "BMW", "Fiat"]'; const myArray = JSON.parse(myJSON); document.getElementById("demo").innerHTML = myArray; </script> </body> </html>