DEV Community

Discussion on: Considering `??` vs `||`

Collapse
 
lexlohr profile image
Alex Lohr

Also your syntax error is actually that, because the correct code would be

let x
x?.run() // undefined
x?.run?.() // undefined
Enter fullscreen mode Exit fullscreen mode