DEV Community

Discussion on: Change your old methods for writing a JavaScript Code - Shorthand's for JavaScript Code

Collapse
 
ricky11 profile image
Rishi U

2nd Example optional chaining will return undefined if console.log like that, you would probably need to do use a ternary instead if you didn't want to print undefined.
but thanks for this.