Flash Lite 2 |
|||
| Flash Lite 2.x ActionScript 언어 참조 설명서 > ActionScript 언어 요소 > 연산자 > instanceof 연산자 | |||
object instanceof classConstructor
object가 classConstructor의 인스턴스 또는 classConstructor의 하위 클래스인지 여부를 테스트합니다. instanceof 연산자는 원시 유형을 래퍼 객체로 변환하지 않습니다. 예를 들어, 다음 코드에서는 true를 반환합니다.
new String("Hello") instanceof String;
그러나 다음 코드에서는 false를 반환합니다.
"Hello" instanceof String;
지원 버전: ActionScript 1.0, Flash Lite 2.0
object : Object - ActionScript 객체입니다.
classConstructor : Function - String 또는 Date 같은 ActionScript 생성자 함수에 대한 참조입니다.
Boolean - object가 classConstructor의 인스턴스이거나 하위 클래스이면 instanceof에서 true를 반환하고, 그렇지 않으면 false를 반환합니다. 또한 _global instanceof Object에서도 false를 반환합니다.