📜  Say Hello Say Bye 在 javascript 代码示例中

📅  最后修改于: 2022-03-11 15:02:15.541000             🧑  作者: Mango

代码示例1
function sayHelloBye(name, num) {
    if (num === 1) return ("Hello " + name.charAt(0).toUpperCase() + name.slice(1));
    else if (num ===0) return ("Bye " + name.charAt(0).toUpperCase() + name.slice(1));
}