<!DOCTYPE html>
<html>
<body>
<h2>JavaScript配列からJSON文字列を作成します。</h2>
<p id="demo"></p>
<script>
const arr = ["John", "Peter", "Sally", "Jane"];
const myJSON = JSON.stringify(arr);
document.getElementById("demo").innerHTML = myJSON;
</script>
</body>
</html>