Apologies for keeping you busy ! These are very new so I fully understand if you don't support them :-
let vehicle = {
};
let vehicle1 = {
car: {
name: 'ABC',
speed: 90
}
};
console.log(vehicle.car?.name); // Undefined
console.log(vehicle.car?.speed); // Undefined
console.log(vehicle1.car?.name); // ABC
console.log(vehicle1.car?.speed); // 90
yields the following error :- UnexpectedToken(Position { line: 12, column: 25 }, "Expected {, [, or (; found Punct(Period)")
Apologies for keeping you busy ! These are very new so I fully understand if you don't support them :-
yields the following error :-
UnexpectedToken(Position { line: 12, column: 25 }, "Expected{,[, or(; found Punct(Period)")