instanceOf

fun instanceOf(a: Any?, b: Any?, cx: Context): Boolean(source)

InstanceofOperator (ES 13.10.2): the target's Symbol.hasInstance decides, called with the target as this and a as its argument, and only a target without one has to be callable and is asked OrdinaryHasInstance. Upstream asked a function its prototype chain whatever it defined, answered false for a primitive before looking, passed an object's method the target itself in place of a, and passed over a Symbol.hasInstance that was not callable .