I have a method:
const objT2 = {
calcAge(year) {
console.log(2022 - year);
},
};
but when I use the nullish coalescing both parts is being executed.
objT2.calcAge(1990) ?? console.log(`method not found`);
//output => 32 method not found