JavaScript with Promises: Managing Asynchronous Code