QuizNot attempted
instanceof
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
- Whether
F.prototypeappears anywhere inx's prototype chain
instanceofwalksx's prototype chain (Object.getPrototypeOfrepeatedly) looking for the currentF.prototypeobject (customisable viaSymbol.hasInstance).- Not 'created by new F': reassign
F.prototypeand old instances fail Object.create(F.prototype)passes withoutnew.- Not x.constructor === F:
constructoris an ordinary, overwritable property and isn't consulted. - Not 'F has property x': that is the
inoperator.