Skip to content Skip to sidebar Skip to footer
Showing posts with the label Prototype

Why Is `object() === New Object()` Equal To `false`?

Why it returns false? let a = new Object() let b = Object() console.log(a) // {} console.log(b) // … Read more Why Is `object() === New Object()` Equal To `false`?

How Could This Be True??? Obj2.__proto__.isprototypeof(obj2) //true

Consider this short code: let obj1 = { name: 'obj1', } const obj2 = Object.create(obj1);… Read more How Could This Be True??? Obj2.__proto__.isprototypeof(obj2) //true

What Is The Specific Impact Of Assigning __proto__ In Each Browser?

This is for a very specific use case. And this is all in typescript (which for this use case I thin… Read more What Is The Specific Impact Of Assigning __proto__ In Each Browser?

Console.log A Javascript Object/class - Same Result Before And After The Change Of The Prototype

I'm trying to understand how js prototypes and classes work, and I'm using Chrome's con… Read more Console.log A Javascript Object/class - Same Result Before And After The Change Of The Prototype

Resetting The Constructor Property Of Prototype Object

Consider the following snippet: function shape(){ this.name = '2d shape' } function tr… Read more Resetting The Constructor Property Of Prototype Object

How To Tell If An Object Has A Given Prototype?

How can one detect if a given browser has the searchParams prototype for URL? https://developer.mo… Read more How To Tell If An Object Has A Given Prototype?