function hello(){
return 'Helllo!'
}
console.log(hello);
function plus(num){
return num + 1;
}
console.log(plus(2)); //3
console.log(plus(7)); //8
console.log(plus()); // NaN = undefined + 1;
function plusV2(num){
if(type num !== 'number'){
console.log('숫자를 입력해주세요!')
return 0;
}
return num + 1;
}
console.log(plusV2()) // 숫자를 입력해주세요! 0