// 파일이름 : 002\one.js
const 이호준개인프로필 = require('./two');
console.log(이호준개인프로필.이름);
console.log(이호준개인프로필.나이);
이호준개인프로필.한살더먹음();
이호준개인프로필.한살더먹음();
//console.log(이호준개인프로필.나이); //이렇게 출력하면 증가안됨
console.log(이호준개인프로필.값가져와());
// 파일이름 : 002\two.js
let 이름 = '호준';
let 나이 = 10;
function 한살더먹음(){
나이 += 1;
}
function 값가져와(){
return 나이
}
module.exports.이름 = 이름; // 0. 모듈 생략 가능
// 1. 컨트롤 눌러서 module 클릭도 해보시고
// 2. console.log(module)해서 찍어보세요.
module.exports.나이 = 나이;
module.exports.한살더먹음 = 한살더먹음;
module.exports.값가져와 = 값가져와;