function instanceof(left, right) {
//
let prototype = right.prototype
//
left = left.__proto__
//
while (true) {
if (left === null)
return false
if (prototype === left)
return true
left = left.__proto__
}
}
I feel like I made a fake front end two years ago, and I don"t understand the meaning of this code at all. Why do you set left=left.__proto__
outside the while and repeat it in the loop? Solve