const getValue = (x) => {
console.log(`Getting: ${x}`);
return x;
};
const obj = { name: null };
const result = obj.name || getValue('default') && getValue('final');
console.log(`Result: ${result}`); Post #2878
4.06K
CHALLENGE
- 👍 5
- 🔥 2