Optional chaining in JS
Optional chaining in JavaScript ensures to open a object if the field exists.
The below syntax, with coordinate?, tells the compiler to get x only if coordinate is not null.
ranger.coordinate?.x
Optional chaining in JavaScript ensures to open a object if the field exists.
The below syntax, with coordinate?, tells the compiler to get x only if coordinate is not null.
ranger.coordinate?.x