Search
The following code throws an error because car2.engine does not have the method start. Add optional chaining to car2.engine.start() so that the start method is only invoked if it exists.
car2.engine
start
car2.engine.start()
For example: