Guia de entrevista · JavaScript

What is a Prototype?

do caderno de estudos · atualizado em 2 de outubro de 2026
Para quem vai encarar entrevista de JavaScript2 min

Resposta curta e em inglês, para ler, fechar e treinar em voz alta.

A resposta, como você fala na entrevista

An ordinary object has an internal prototype that is another object or null. Property lookup checks the object first, then follows that chain until it finds the property or reaches null.
Object.create(null) creates an object with no prototype. It does not inherit toString or hasOwnProperty. Use Object.hasOwn(obj, key) to test ownership and Object.getPrototypeOf(obj) to inspect the prototype.

Trap: the legacy __proto__ accessor is not the internal link itself and is not inherited by a null-prototype object. A property named __proto__ is not a reliable way to inspect arbitrary objects.

Source: MDN Object.create.

Pegadinha clássica

Essa pergunta tem uma armadilha que derruba muita gente em entrevista. Ela está marcada na resposta acima: vale reler antes de treinar.

Ler é o primeiro passo. No app, essa pergunta vira flashcard com repetição espaçada, e o módulo tem quiz e simulado para testar o que ficou.

Treinar essa pergunta no app