「JavaScript入門」typeofの使い方
サンプルコード
typeof NaN === 'number'; typeof Number(1) === 'number'; typeof "" === 'string'; typeof true === 'boolean'; typeof Symbol('foo') === 'symbol'; typeof undefined === 'undefined'; typeof null === 'object' typeof [1, 2, 4] === 'object'; typeof new Boolean(true) === 'object'; typeof new Number(1) === 'object'; typeof new String("abc") === 'object'; typeof function(){} === 'function';