- 2

Contact Manager answer is not getting accepted

Hello, Here is my code, ____________________________________ function contact(name, number) { this.name = name; this.number = number; this.print = function print (){ console.log(this.name + ":" + this.number); } } var a = new contact("David", 12345); var b = new contact("Amy", 987654321); a.print(); b.print(); ___________________________________ My output is the same as the expected output, but it is not accepting my answer. Is there any fault with my code? I'm sorry about my broken English. I'm not very good at English.

13th Jun 2021, 4:46 PM
Naimur Rahman
Naimur Rahman - avatar
1 Réponse
+ 3
I think, in console.log() a white space is missing: try to change ":" to ": "
13th Jun 2021, 5:24 PM
Lisa
Lisa - avatar