From 5eb162e3d5fc49cf2246b0f2609870fa4189630e Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Wed, 3 Aug 2022 19:32:27 +0800 Subject: [PATCH] fix: typo in javascript trivia (#352) --- contents/javascript-questions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/javascript-questions.md b/contents/javascript-questions.md index 79baa43b5..823d4bdbc 100644 --- a/contents/javascript-questions.md +++ b/contents/javascript-questions.md @@ -49,7 +49,7 @@ ES6 allows you to use [arrow functions](http://2ality.com/2017/12/alternate-this ### Explain how prototypal inheritance works -This is an extremely common JavaScript interview question. All JavaScript objects have a `__proto__` property with the exception of objects created with `__Object.create(null)__`, that is a reference to another object, which is called the object's "prototype". When a property is accessed on an object and if the property is not found on that object, the JavaScript engine looks at the object's `__proto__`, and the `__proto__`'s `__proto__` and so on, until it finds the property defined on one of the `__proto__`s or until it reaches the end of the prototype chain. This behavior simulates classical inheritance, but it is really more of [delegation than inheritance](https://davidwalsh.name/javascript-objects). +This is an extremely common JavaScript interview question. All JavaScript objects have a `__proto__` property with the exception of objects created with `Object.create(null)`, that is a reference to another object, which is called the object's "prototype". When a property is accessed on an object and if the property is not found on that object, the JavaScript engine looks at the object's `__proto__`, and the `__proto__`'s `__proto__` and so on, until it finds the property defined on one of the `__proto__`s or until it reaches the end of the prototype chain. This behavior simulates classical inheritance, but it is really more of [delegation than inheritance](https://davidwalsh.name/javascript-objects). #### Example of Prototypal Inheritance