[JS] Null or undefined in prototype chain
Hey I read that if we search beyond the prototypes linked together i.e. the chain ends and we are still searching we get null.
Also, if the function or property is not found, we get undefined.
Now, how is it possible to get undefined, if I will end up searching beyond the chain, wouldn't I always get null? The reason, I will end up searching beyond the chain is coz that function or property doesn't exist, so we wont give up and keep on searching. Which means it is impossible to get undefined?
Also, if the function or property is not found, we get undefined.
Now, how is it possible to get undefined, if I will end up searching beyond the chain, wouldn't I always get null? The reason, I will end up searching beyond the chain is coz that function or property doesn't exist, so we wont give up and keep on searching. Which means it is impossible to get undefined?
