I have the following simple literal object:
const ob = { 'xxx:': 'abc', aaaa: 3, ccc: [1, 2, 3] };
let's say i'm not sure that i have a ccc key in the object so i want to use Optional Chaining but i'm getting a syntax error when trying to run:
const ddd = ob.ccc?.[0];
What is the correct syntax that takes the value only if *ccc key exist?