Take this cool example I extended from [Wayback/Archive] Thomas 🅰️🇨🇵 on Twitter: “#Typescript quizz What will be the value of result1 and result2 ?” which lacked alt-badge, so I [Wayback/Archive] responded with the image on the right that has alt-text.
Based on that, I added a bit of logging:
const a = undefined; const result1 = a ?? 0 + 10; const b = 100; const result2 = b ?? 0 + 10; console.log(result1); console.log(result2);
Two questions:
- What is the output of both log lines?





