+ 7
I was given print()method but I used function contact(name, number) { this.name = name; this.number = number; } va
JavaScript contact manager
5 ответов
+ 1
function contact(name, number) {
this.name = name;
this.number = number;
this.print = function() {
console.log(name +": " + number);
}
}
+ 6
Full code please
+ 5
Ok
+ 3
Sky Lord,
I know you have got a solution, I'm just reminding you to tag a relevant language name, rather than having 'is there any other way to solve it'. Up there please ... ☝
+ 2
print = function () {
console.log(name+": "+number);
}
Add this inside contact function