SOURCE

const obj = new Object();
const arr = new Array();
const date = new Date();
// const math = new Math(); // Uncaught TypeError: Math is not a constructor
const reg = new RegExp();
const map = new Map();
const weakMap = new WeakMap();
const set = new Set();
const weakSet = new WeakSet();

const str = new String('test');
const str1 = 'test';

const bo = new Boolean(1);
const num = new Number('5');

const nu = null;


console.log(`obj 是不是Objec的实例? - ${obj instanceof Object}`); // true
console.log(`arr 是不是Array的实例? - ${arr instanceof Array}`); // true
console.log(`date 是不是Date的实例? - ${date instanceof Date}`); // true
console.log(`reg 是不是RegExp的实例? - ${reg instanceof RegExp}`); // true
console.log(`map 是不是Mp的实例? - ${map instanceof Map}`); // true
console.log(`weakMap 是不是WeakMap的实例? - ${weakMap instanceof WeakMap}`); // true
console.log(`set 是不是Set的实例? - ${set instanceof Set}`); // true
console.log(`weakSet 是不是WeakSet的实例? - ${weakSet instanceof WeakSet}`); // true
console.log(`str 是不是String的实例? - ${str instanceof String}`); // false
console.log(`str1 是不是String的实例? - ${str1 instanceof String}`); // true
console.log(`bo 是不是Boolean的实例? - ${bo instanceof Boolean}`); // true
console.log(`num 是不是Number的实例? - ${num instanceof Number}`); // true


console.log(`arr 是不是Object的实例? - ${arr instanceof Object}`); // true
console.log(`nu 是不是Object的实例? - ${nu instanceof Object}`); // false
console 命令行工具 X clear

                    
>
console