I don't understand something.
Why calling new Person(..,..) returns toString()?
The example calls:
console.log( 'Full name is:', new Person('Michael', 'Bluth2') );
new Person should create an instance of Person, but why it calls toString()?.
Why calling new Person(..,..) returns toString()?
The example calls:
console.log( 'Full name is:', new Person('Michael', 'Bluth2') );
new Person should create an instance of Person, but why it calls toString()?.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...