Glossary: Software Design Patterns in JavaScript
Optional chaining (?.)
Also written: ?.
Calls a method or reads a property only if the value isn't undefined or null, otherwise it does nothing. history.pop()?.undo() safely does nothing when the stack is empty.