0
Js object module project help
I don't understand why this code doesn't work - even outside the test cases - I need help in solving this project problem which is out putting the name: number using the method "print" of the contact object , thanks in advance. https://code.sololearn.com/cF8Fo188FHvD/?ref=app
4 Respostas
+ 1
Put one of these } on line 6 your welcome 😉
+ 1
Oh my god what a simple mistake ! 😂 thanks a lot😇
+ 1
Manar Ahmed haha no problem, I guarantee every programmer has done this 😁
0
function contact(name, number) {
this.name = name;
this.number = number;
this.sara= function()
{
console.log(name,":", number);
}
this.name = name;
this.number= number;
this.bahri = function()
{
console.log(name,":", number);
}
}
var a = new contact("David", 12345);
var b = new contact("Amy", 987654321);
a.sara();
b.bahri();
the same output but still false!