为什么student能输出 但是teacher的add方法就提示not a function?????不明白啊 求解
// index.js
var classes = require('./klass');
classes.add('Mr.Li','baifumei');//student.js
function add(student){
console.log("add student:"+student);
}
exports.add=add;
//teacher.js
function add2(teacher){
console.log('woshishei');
}
exports.add2=add2;
//klass.js
var student = require('./student');
var teacher = require('./teacher');
function add(teacher,students){
student.add(students);
console.log(teacher);
teacher.add2(teacher);
};
exports.add = add;