📜  三元运算符调用箭头函数 - Javascript 代码示例

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

代码示例1
const isActive = true;
const showUser = () => console.log('Display user');
const hideUser = () => console.log('Hide User');
isActive ? showUser() : hideUser();
//Expected output: Display user