Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
In Javascript all objects have prototypes, except for the base object

for clarifying, there is an interview question's answer on github that says :

All objects have prototypes, except for the base object. The base object is the object created by the user, or an object that is created using the new keyword. The base object has access to some methods and properties, such as .toString. This is the reason why you can use built-in JavaScript methods! All of such methods are available on the prototype. Although JavaScript can't find it directly on your object, it goes down the prototype chain and finds it there, which makes it accessible for you.

I've read this answer several times, but unfortunately it did not help me, could anyone explain it in a more understandable way?.

Also the link to answer is here.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The vast majority of objects you'll encounter ultimately inherit from Object.prototype. This includes built-in objects and objects created with object literal syntax, among many others.

const obj = {};
console.log(Object.getPrototypeOf(obj) === Object.prototype);

A very few objects, including Object.prototype itself, do not inherit from anything. This will only occur if the object is explicitly created with Object.create(null).

console.log(
  Object.getPrototypeOf(Object.prototype) === null,
  Object.getPrototypeOf(Object.create(null)) === null
);

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!