You are working on a Contact Manager app. You have created the contact object constructor, which has two arguments, name and nu | SoloLearn: Learn to code for FREE!

0

You are working on a Contact Manager app. You have created the contact object constructor, which has two arguments, name and nu

Help me

1/12/2021 2:39:53 PM

Prabu S

18 Answers

New Answer

0

Your code should be in this way

+2

Exactly, that's the exercise. Now you gotta try yourself, and if you fail, share what you tried and I'll help you.

+1

Prabu S please show your attempt.

+1

Hello Prabu S, We wont solve the coach problems for you, but we'll help you to find a solution yourself. Please share your try here first, then we can have a look at what's wrong. Thanks :)

+1

I tried many times but I fail pls help me Spentify

+1

function contact(name, number) { this.name = name; this.number = number; } var a = new contact("David", 12345); var b = new contact("Amy", 987654321) a.print(); b.print(); Spentify

+1

Something like this: function contact(name, number) { this.name = name; this.number = number; print() { console.log(this.name + ": " + this.number); } } var a = new contact("David", 12345); var b = new contact("Amy", 987654321) a.print(); b.print();

+1

Spentify your code error showing in the output

+1

I'm not working on this App?

0

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.

0

In java script

0

function contact(name, number) { this.name = name; this.number = number; } var a = new contact("David", 12345); var b = new contact("Amy", 987654321) a.print(); b.print();

0

Prabu S I will but paste your code here, please...

0

Here: function contact(name, number) { this.name = name; this.number = number; this.print = function() { console.log(this.name + ": " + this.number); } } var a = new contact("David", 12345); var b = new contact("Amy", 987654321) a.print(); b.print();

0

function contact(name, number) { this.name = name; this.number = number; this.print = function(){ console.log(this.name +":"+" "+ this.number) } } var a = new contact("David", 12345); var b = new contact("Amy", 987654321) ; a.print(); b.print();

-1

Spentify

-1

Motuncoded tq so much💯

-2

function contact(name, number) { this.name = name; this.number = number; this.print = function(){ console.log(this.name +":"+" "+ this.number) } } var a = new contact("David", 12345); var b = new contact("Amy", 987654321) ; a.print(); b.print();