File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,6 @@ const adminFunctionStore = Object.create(userFunctionStore);
181181function adminFactory ( name , score ) {
182182 const admin = new userFactory ( name , score ) ;
183183 admin . type = 'Admin' ;
184- admin . prototype = adminFunctionStore ;
185184 return admin ;
186185}
187186
@@ -191,5 +190,5 @@ userFunctionStore.sharePublicMessage = () => console.log('Welcome users!');
191190const adminFromFactory = adminFactory ( "Eva" , 5 ) ;
192191
193192// /********* Uncomment these lines to test your work! *********/
194- // adminFromFactory.sayType() // -> Logs "I am a Admin"
195- // adminFromFactory.sharePublicMessage() // -> Logs "Welcome users!"
193+ adminFromFactory . sayType ( ) // -> Logs "I am a Admin"
194+ adminFromFactory . sharePublicMessage ( ) // -> Logs "Welcome users!"
You can’t perform that action at this time.
0 commit comments