0

Why does this show [object Object] ?

function fem(number,who) { this.number=number; this.who=who; this.changeName = function(name) { this.name = name; }; } var a = new fem(2,"raxe and dedz"); a.changeName("Dedz"); document.write(a) why does it show [object Object]?

27th Jan 2017, 12:54 PM
Mask
Mask - avatar
1 Antwort
+ 1
nvm i found the solution its (a.name)
27th Jan 2017, 12:55 PM
Mask
Mask - avatar