+ 1
Code project 36
Please I need solution for code project 36 in Javascript
7 Respuestas
+ 2
SoloLearn is not an answer giving apps or service.
You need to show your attempts first and then the community and you can think and solve together hopefully.
+ 1
TCHAMDE DJEUMO YVES ROMIALD
what's wrong with your code?
Or, what is the question asking for?
+ 1
Hi, maybe it will work for you:
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
Here is my atempt:
function contact(name, number) {
this.name = name;
this.number = number;
this.print=function(){
alert(this.name+": "+this.number);}
}
var a = new contact("David", 12345);
var b = new contact("Amy", 987654321);
a.print();
b.print();
0
He gives me an error
0
Thank you it works
0
guys, i need help..
i dont know in that i wrong...
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();