A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-113.js
1constproto={greet:"hi"};
2constobj=Object.create(proto);
3obj.greet="yo";
4console.log(obj.greet,proto.greet);
Scope
Answer & explanation
Console output
yo hi
Why
Writing obj.greet = "yo" creates an own property on obj that shadows the inherited one from proto; it does not modify the prototype. So obj.greet resolves to the own value "yo" while proto.greet remains "hi". Property writes are local to the object, even when a same-named property exists up the prototype chain.