Answers for "Ternary operator call arrow function"

0

Ternary operator call arrow function

const isActive = true;
const showUser = () => console.log('Display user');
const hideUser = () => console.log('Hide User');
isActive ? showUser() : hideUser();
//Expected output: Display user
Posted by: Guest on September-11-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language