I have a mostly conceptual question. So in this chapter, we switch out the datastore.js for remotedatastore.js essentially. Instead of passing an instance of DataStore to Truck’s constructor, we pass in an instance of RemoteDataStore.
The book stresses that this should work seamlessly (mostly), because the functions in both scripts take the same parameters. However, I’m very confused by this because the RemoteDataStore getAll method takes in a function as a parameter, while the DataStore getAll method takes no parameters.
Thus, when I try to call myTruck.printOrders() from the console, it errors because there is no function being passed into the RemoteDataStore getAll method. Did the book forget to address this minor detail, or am I missing something in the bigger picture?