2. CommonJS

index.js
const checkNumber = require('./func')

console.log(checkNumber(10)); // 짝수 입니다.
console.log(checkNumber(5)); // 홀수 입니다.