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

291
Views
How Prototype works in Object Literals in Javascript

I am new to prototypes. I have defined an object literal like this

const obj = {
    name: 'Prashant',
    sayHI(){
        console.log("Hi, I am Prashant");
    }
}

console.log(obj);

Result in console here!!!:
Result in console here!!!

After console logging the object I am getting a property ([[Prototype]]: Object) whose __proto __ property is also referencing to object.prototype.

If obj is an object why it's prototype is also pointing to object.prototype instead of pointing to null and why they both have the same functions?

about 4 years ago · Juan Pablo Isaza
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!