instanceof

긴 말 필요없이 소스코드를 보자. 생성자 Student 선언 생성자 호출 instanceof 메소드 instanceof 메소드 [구문] object_name instanceof Constructor_name(==Class_name) ※ Return type is Boolean (true or false) [용도] Object의 Prototype 혹은 Constructor 이름이 맞는지 확인 생성자의 prototype 속성이 객체의 프로토타입 체인에 존재하는지 판별. https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/instanceof [다음편] 프로토타입에 대해 아라보자. https://m-falcon.tistory.com/..
M_Falcon
'instanceof' 태그의 글 목록