Pls help me fix the errors and show me each error and how you were able to fix it. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Pls help me fix the errors and show me each error and how you were able to fix it.

I want to output the return "statement" in class classMate https://code.sololearn.com/WuoXAIai8gFh/?ref=app

4th Nov 2021, 1:36 PM
Okafor Okwuchukwu Charisma
Okafor Okwuchukwu Charisma - avatar
2 Answers
0
//Missing } on line no 20 //now it is not showing any errors class students{ constructor (fn,ln,cls){ this.firstName = fn this.lastName = ln this.cls = cls } showDetails(){ return `my name is ${this.firstName} ${this.lastName} i am in ${this.cls} `} } class classMate extends students{ constructor(fn,ln,cls,age){ super(fn,ln,cls) this.age = age } show(){ return `${this.showDetails()} and ${this.age}` } } myClassMate = new classMate("uche", "kalu", "js 2", "40 years") console.log("myClassMate")
4th Nov 2021, 3:36 PM
Rohit Pratap
Rohit Pratap - avatar
0
@Rohit Pratap, thank you so much, but the output is not what I expected to see. I expect to see the arguments passed into the class classMate
4th Nov 2021, 4:48 PM
Okafor Okwuchukwu Charisma
Okafor Okwuchukwu Charisma - avatar