+ 1

Why super.bioData() not doing it's job?

How can I use super for accessing instance methods of parent class https://code.sololearn.com/cw6SKl3IBYV2/?ref=app

15th Aug 2021, 11:11 AM
Mohd Aadil
Mohd Aadil - avatar
3 Antworten
+ 4
Mohd Aadil Use this.bioData() instead of super.bioData()
15th Aug 2021, 11:20 AM
A͢J
A͢J - avatar
+ 3
Mohd Aadil Because you are calling bioData() function using object of player1 so in this case super will not work that's why you are getting error "bioData()" not a function. I think you have to watch that video again. There implementation of super maybe different
15th Aug 2021, 11:41 AM
A͢J
A͢J - avatar
0
Hello A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ Sir But why not super.bioData() I watched a video and he did the same thing as I but his code worked than Sir why not mine?
15th Aug 2021, 11:30 AM
Mohd Aadil
Mohd Aadil - avatar