「JavaScript入門」instanceof演算子の使い方
サンプルコード
let simpleStr = "This is a simple string";
let myString = new String();
let newStr = new String("String created with constructor");
let myDate = new Date();
let myObj = {};
simpleStr instanceof String; // false
myString instanceof String; // true
newStr instanceof String; // true
myString instanceof Object; // true
myDate instanceof Date; // true
myObj instanceof Object; // true