public static boolean instanceOf ( Object a , Object b , Context cx ) { // Check RHS is an object if ( ! ( b instanceof Scriptable ) ) { throw typeError0 ( "msg.instanceof.not.object" ) ; } // for primitive values on LHS, return false if ( ! ( a instanceof Scriptable ) ) return false ; return ( ( Scriptable ) b ) . hasInstance ( ( Scriptable ) a ) ; }
The instanceof operator .