I like books, poems, music and mountains but currently busy centering divs.
Hello. I'm a Software Engineer from Bangladesh. I like all things JS may it be vanilla or fancy like Next.js. In my free time I like to read, listen to music and climb mountains but currently busy centering divs.
Markdown supported · ⌘↵ to post
Victor Souza
If you call a property/method and it doesn't exist, it returns undefined:
const myObject = { city: "Madrid", greet: function () { console.log(`Greetings from ${this.city}`); } } myObject.greet(); // Ok: Greetings from Madrid myObject.country; // undefinedHowever, the prototype chain ends when null is found:
Object.prototype // nullThat is a little weird for me, but I got it :)
Adib Hasib, thanks for the great post. I was studying it today so its nice to read it here ✨🎉