Open hi-jade88 opened 2 years ago
const printFactory = (name) => (num) => {
num === 0
? console.log(`반가워 나는 ${name}`)
: console.log(`잘가 나는 ${name}`)
}
const printFactory = name => (
num => {
if (num === 0) {
console.log('반가워 나는 ' + name);
} else if (num === 1) {
console.log('잘가 나는 ' + name);
}
}
)