Hi , please little help in code project contact manager | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Hi , please little help in code project contact manager

You are working on a Contact Manager app. You have created the contact object constructor, which has two arguments, name and number. You need to add a print() method to the object, which will output the contact data to the console in the following format: name: number The given code declares two objects and calls their print() methods. Complete the code by defining the print() method for the objects

4th Jul 2021, 3:57 AM
Eman Ibrahim hassan
Eman Ibrahim hassan - avatar
11 Answers
+ 2
Post your attempt also so that community can help you what u hace tried and wherr u facing problems
4th Jul 2021, 4:08 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
Thanks 😍
4th Jul 2021, 4:14 AM
Eman Ibrahim hassan
Eman Ibrahim hassan - avatar
0
Akash Kumar don't give answer without OP had showed its attempt... and anyway, rather guide him than give him ready made solution without explanations ^^
4th Jul 2021, 4:15 AM
visph
visph - avatar
0
This is the right answer class contact { constructor(name, number) { this.name = name; this.number = number; } print() { console.log(`${this.name}: ${this.number}`); } } var number1 = new contact("David", "12345"); var number2 = new contact("Amy", "987654321"); number1.print(); number2.print();
4th Jul 2021, 4:21 AM
Eman Ibrahim hassan
Eman Ibrahim hassan - avatar
0
Akash Kumar even if that was too late, as OP as already seen your code ^^ Eman Ibrahim hassan don't be lazy and try by yourself: practice is the only way to learn ^^ however, if you stuck, post your try and we will guide you to complete by yourself ;)
4th Jul 2021, 4:22 AM
visph
visph - avatar
0
visph I try but it doesn't work , really I will do the next time by myself
4th Jul 2021, 4:29 AM
Eman Ibrahim hassan
Eman Ibrahim hassan - avatar
0
Eman Ibrahim hassan what happened with your code its working without any errors
4th Jul 2021, 5:16 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
A.S. that's not its code, he lazy had copy-pasted the code from Akash Kumar link (wich had deleted its answer but too late ^^)
4th Jul 2021, 5:19 AM
visph
visph - avatar
4th Jul 2021, 5:21 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
visph all ready team of solo learn help you and write some code and complete them I just saw the right answer not copy it
4th Jul 2021, 5:36 AM
Eman Ibrahim hassan
Eman Ibrahim hassan - avatar
- 1
A.S. yeah I complete the course thanks
4th Jul 2021, 5:36 AM
Eman Ibrahim hassan
Eman Ibrahim hassan - avatar