<!DOCTYPE html>
<html>
<body>
<h2>JavaScriptオブジェクトコンストラクター</h2>
<p id="demo"></p>
<script>
const x1 = new String(); // 新しいStringオブジェクト
const x2 = new Number(); // 新しいNumberオブジェクト
const x3 = new Boolean(); // 新しいBooleanオブジェクト
const x4 = new Object(); // 新しいObjectオブジェクト
const x5 = new Array(); // 新しいArrayオブジェクト
const x6 = new RegExp(); // 新しいRegExpオブジェクト
const x7 = new Function(); // 新しいFunctionオブジェクト
const x8 = new Date(); // 新しいDateオブジェクト
// すべてのオブジェクトのタイプを表示する
document.getElementById("demo").innerHTML =
"x1: " + typeof x1 + "<br>" +
"x2: " + typeof x2 + "<br>" +
"x3: " + typeof x3 + "<br>" +
"x4: " + typeof x4 + "<br>" +
"x5: " + typeof x5 + "<br>" +
"x6: " + typeof x6 + "<br>" +