DEV Community

Discussion on: Using the optional chaining operator in JavaScript

Collapse
 
tnifey profile image
Hub

there is a typo in 5th example

console.log(conditionalProperty?.[index++)]; // undefined
Enter fullscreen mode Exit fullscreen mode

should be

console.log(conditionalProperty?.[index++]); // undefined
Enter fullscreen mode Exit fullscreen mode
Collapse
 
saranshk profile image
saransh kataria

updated. Thanks!