📅  最后修改于: 2022-03-11 15:03:51.393000             🧑  作者: Mango
const fs = require('fs');
const path = require('path');
let student = {
name: 'Mike',
age: 23,
gender: 'Male',
department: 'English',
car: 'Honda'
};
fs.writeFileSync(path.resolve(__dirname, 'student.json'), JSON.stringify(student));