From 6303d088e709ae86213ec0395ef3efe81bf5193f Mon Sep 17 00:00:00 2001 From: JackD Date: Mon, 10 Jan 2022 11:31:53 -0500 Subject: [PATCH 1/2] update robotFido speak console.log message comment --- oop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oop.js b/oop.js index 9e539c8..19665eb 100644 --- a/oop.js +++ b/oop.js @@ -217,4 +217,4 @@ let robotFido = new Dog(); robotFido = Object.assign(robotFido, robotSkillsMixin); // /********* Uncomment these lines to test your work! *********/ -robotFido.speak() // -> Logs "I am made of metal" \ No newline at end of file +robotFido.speak() // -> Logs "I have 4 legs and am made of metal" \ No newline at end of file From 066cf163c944fe128a167aab414675cc9dcb29c7 Mon Sep 17 00:00:00 2001 From: JackD Date: Mon, 10 Jan 2022 11:35:13 -0500 Subject: [PATCH 2/2] updated admin prototype --- oop.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oop.js b/oop.js index 19665eb..9de8e05 100644 --- a/oop.js +++ b/oop.js @@ -180,12 +180,13 @@ const adminFunctionStore = Object.create(userFunctionStore); function adminFactory(name, score) { const admin = new userFactory(name, score); + Object.setPrototypeOf(admin, adminFunctionStore) admin.type = 'Admin'; return admin; } /* Put code here for a method called sharePublicMessage*/ -userFunctionStore.sharePublicMessage = () => console.log('Welcome users!'); +adminFunctionStore.sharePublicMessage = () => console.log('Welcome users!'); const adminFromFactory = adminFactory("Eva", 5);