How nodejs module.exports references methods in a class prototype

a.js
this is node to export a class
let Person = function () {

this.name = ";

}
Person.prototype = {

constructor:Person,
say:function () {
    console.log("my name is "+this.name);
}

};
module.exports.Person = Person;
b.js
reference a.js file
let Person = require (". / a.js");
let person = new Person ("Zhang San");
console.log (person.say ());

)

Why did you finally output my name is Zhang San and undefined

Mar.31,2021

person.say () is a method that does not return anything
you console.log directly (person.say ()) is undefined of course

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e452d4-2704f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e452d4-2704f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?