0
Content Manager JavaScript?
Problem Content Manager JavaScript
6 Respostas
+ 2
Jonathan
You need to close brackets after console.log(x + ": " + y);
+ 1
Jonathan
You missed one closing brackets of function this.print and also there should be space after colon (:) not before colon (:)
+ 1
I Am AJ ! Thanks AJ! Appreciate it! Stupid of me haha!
0
function contact(name, number) {
this.name = name;
this.number = number;
this.print = function(){
var x = this.name
var y = this.number
console.log(x+" :"+y);
}
var a = new contact("David", 12345);
var b = new contact("Amy", 987654321)
a.print();
b.print();
0
What am I doing wrong?
0
function contact(name, number) {
this.name = name;
this.number = number;
this.print = function(){
var x = this.name
var y = this.number
}
console.log(x+": "+y);
}
var a = new contact("David", 12345);
var b = new contact("Amy", 987654321)
a.print();
b.print();
I Am AJ ! Like this? It still doesn't work