From 205117c744052333faeb1d144b01f3b9d846eec3 Mon Sep 17 00:00:00 2001 From: kv82394 Date: Wed, 17 Mar 2021 11:22:33 +0530 Subject: [PATCH] change in commented section of "What is a class?" In the line alert(User.prototype.sayHi); the User.prototype.sayHi gives the "[Function: sayHi]" as a output whcih tells about type and name of the method. --- 1-js/09-classes/01-class/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/09-classes/01-class/article.md b/1-js/09-classes/01-class/article.md index 318cf28915..db5c0f43e4 100644 --- a/1-js/09-classes/01-class/article.md +++ b/1-js/09-classes/01-class/article.md @@ -110,7 +110,7 @@ alert(typeof User); // function alert(User === User.prototype.constructor); // true // The methods are in User.prototype, e.g: -alert(User.prototype.sayHi); // alert(this.name); +alert(User.prototype.sayHi); // [Function: sayHi] // there are exactly two methods in the prototype alert(Object.getOwnPropertyNames(User.prototype)); // constructor, sayHi