typeof

Custom type => `instancof` Primitive type => `typeof` typeof num1, num2의 타입이 다르게 출력된다. num2를 생성자 new를 통해 생성했기 때문이다. const actionTypes = ['play','connect', 'disconnect', 'cancel']; const userId = undefined; console.log(typeof actionTypes); //object console.log(typeof userId); // undefined console.log(typeof undefined); // undefined console.log(typeof null); // object constructor 인스턴스의 '프로토타입'의 참조..
M_Falcon
'typeof' 태그의 글 목록